In Benghazi on Sunday, Turkish Foreign Minister Ahmet Davutoglu offered the rebels official recognition [AFP]

Turkey has extended official recognition to Libya's rebels and offered at least $200 million in aid as part of a diplomatic shift away from the regime of longtime leader Muammar Gaddafi.

Ahmet Davutoglu, the Turkish foreign minister, met with rebel leaders in Benghazi during a one-day visit to the country on Sunday. He said his country now recognised the opposition National Transitional Council (NTC) as the legitimate representative of the Libyan people.

At the same time, Turkey officially withdrew its ambassador from Tripoli. Salim Levent Sahinkaya had left the Libyan capital in March due to the fighting and had not returned or been replaced.

Turkey has long maintained business ties with Gaddafi's Libya and initially expressed disapproval for NATO air strikes that sought to halt a regime advance on the rebel-held east. But since that campaign began, Turkey has distanced itself.

Speaking to reporters on Sunday, Davutoglu called Libya a "rising star" and said Turkey wanted to see the country succeed.

Rebels back off Gaddafi 'retirement' offer

After Davutoglu's press conference, a spokesman for the rebels retracted a statement made earlier by the opposition leader that Gaddafi could be allowed to "retire" if he gives up all his authority.

Abdel-Hafiz Ghoga suggested that Mustafa Abdel Jalil, the chairman of the NTC, was expressing a personal view and said that the idea is "not part of any discussions on our part in negotiations".

"Let Gaddafi show us one place in Libya where he hasn't harmed, tortured or killed people and he could stay there, but this place doesn't exist," Ghoga said on Sunday evening.

In an interview with the Reuters news agency earlier in the day, Jalil said that the longtime Libyan leader is free to "retire" and stay in the country if he resigns from his position and gives up all power. Jalil said he made the offer to Gaddafi via the United Nations one month ago and had not received a response.

Gaddafi now a 'wanted man'

The International Criminal Court (ICC) last week issued an arrest warrant for Gaddafi, his son, Saif al-Islam and his intelligence chief, Abdullah Sanussi, citing evidence of crimes against humanity committed against political opponents.

The rebel leadership has said it will do its best to see the three men arrested, but it appeared from Jalil's interview that the offer to Gaddafi still stood.

"If he desires to stay in Libya, we will determine the place and it will be under international supervision. And there will be international supervision of all his movements," he said.

"As a peaceful solution, we offered that he can resign and order his soldiers to withdraw from their barracks and positions, and then he can decide either to stay in Libya or abroad."

Al Jazeera's Zeina Khodr, reporting from Benghazi, said news of the offer had been met with dismay by some residents and that it no longer stood, since Gaddafi was a wanted man.

But Jalil still seemed to stand by it. He said the rebel council believed Gaddafi could be held in a military barracks or a civilian building. Jalil is Gaddafi's former justice minister; he defected in the early days of the uprising, which began in mid-February.

There was no immediate reaction from the regime in Tripoli, where Gaddafi has been maintaining a tight hold in an effort to preserve his 41-year rule.

Zuma diplomacy

Meanwhile, South African President Jacob Zuma, who has failed so far in efforts to mediate an end to the conflict, announced he would be visiting Moscow to continue negotiations.

He visited Tripoli at the end of May as a representative of the African Union (AU) but failed to secure a concession from Gaddafi, and the rebels rejected his effort. One sticking point has been disagreements over Gaddafi's future.

The visit to Russia follows an AU summit in Equatorial Guinea, which sought to push a regional peace plan to end the conflict in the north African nation.

The Kremlin said in a statement late on Saturday that Zuma and Dmitry Medvedev, the Russian president, held a telephone conversation in which they agreed to meet as soon as possible.

"The heads of state agreed on a personal meeting in the closest time to agree and co-ordinate the ensuing steps for a solution to the internal Libyan conflict," it said.