Turkey has indicated it is willing to broker a ceasefire between Muammar Qaddafi’s regime and the opposition, as rebel forces advance towards Sirte, the hometown of the Libyan leader.

The Turkish Prime Minister Recep Tayyip Erdogan told the Guardian newspaper that talks were under way with Qaddafi’s government and the opposition’s Transitional National Council. He warned that a prolonged military intervention would turn Libya into a “second Iraq” or “another Afghanistan”.

He also revealed that Turkish specialists are about to take over the running of Benghazi harbour to allow for aid to flow into the rebel stronghold.

Rebel forces have continued their advance towards Tripoli. Having taken the towns of Brega, Ras Lanuf and Bin Jawad, they have reached Sirte. The town is thought to be harbouring strong pro-Qaddafi tendencies, and a lack of support for the rebels could pose a dilemma for the coalition.

Turkey had been opposed to the air operation, although it acquiesced to the imposition of the no-fly zone, restricting its role to logistical support.

Erdogan’s comments came as Nato is finalising the agreement to take over the enforcement of the air campaign against Qaddafi’s military.