Libya's interim government says it will prosecute anyone found responsible for the death of Muammar Gaddafi after his capture, in a retreat from its earlier insistence that the dictator had been killed by crossfire.

The change in position comes after a week of sustained criticism of the Libyan leader's captors, who used their camera phones to chronicle his death. The footage, including images of a wounded Gaddafi being sodomised with what looked like a bayonet, caused widespread revulsion outside the country.

Abdel Hafiz Ghoga, deputy chief of the National Transitional Council, said it would try to bring to justice anyone proven to have fired the shot to the head that killed Gaddafi.

"With regards to Gaddafi, we do not wait for anybody to tell us," he told the al-Arabiya satellite channel. "We had already launched an investigation. We have issued a code of ethics in handling of prisoners of war. I am sure that was an individual act and not an act of revolutionaries or the national army. Whoever is responsible for that [Gaddafi's killing] will be judged and given a fair trial."

Attempts to launch an investigation are unlikely to be welcomed in Misrata, where the rebels who captured Gaddafi in his home town of Sirte are based. Asked this week about the questions surrounding his death by people outside Libya, Misrata's military chief, Ibrahim Beit al-Mal, said: "Why are they even asking this question? He was caught and he was killed. Would he have given us the same? Of course."

Talk of an inquest was being seen by Misrata officials as an attempt by the Benghazi-dominated NTC to claim prominence in post-Gaddafi affairs.

"Everybody knows who caught him and who fought the most during the past nine months," an official said. "It was us. It was no one else."

The identity of the man who allegedly pulled his 9mm pistol from his waistband and shot the wounded dictator in the left temple around 20 minutes after his capture is widely known in Misrata, as is the unit he belonged to, the Katiba Ghoran.

"They won't come near us," said the rebel who pulled Gaddafi from a drain last Thursday. "They won't dare. Gaddafi was saying: 'What's this, what's this?' After nine months of blood, he was saying: 'What's this?'. What does he expect?"

There is little sympathy on the streets of Misrata for Gaddafi's violent end, despite the troubling images and his rotting body being publicly displayed for the next four days.

Meanwhile, Gaddafi son and former heir apparent Saif al-Islam is thought to be in southern Libya approaching the Niger border, where Nigerien officials believe he is planning to join his brother Saadi and the former regime's spy chief Abdullah Senussi in exile.

The NTC maintains that Saif al-Islam is interested in handing himself in to the International Criminal Court, which has issued an arrest warrant against him and Senussi. The court in The Hague says it has had no contact from Libya.

The United Nations on Thursday said it would terminatethe Nato mandate enforcing a no-fly zone over Libya at the end of October, formally ending an eight-month blockade of the country's skies and military operations on the ground. The NTC had earlier asked for operations to continue until the end of the year.

"This marks a really important milestone in the transition in Libya," Britain's ambassador to the UN, Mark Lyall Grant, said. "It marks the way from the military phase towards the formation of an inclusive government, the full participation of all sectors of society, and for the Libyan people to choose their own future."

The security council said it looked forward "to the swift establishment of an inclusive, representative transitional government of Libya" committed to democracy, good governance, rule of law, national reconciliation and respect for human rights.

It strongly urged Libyan authorities "to refrain from reprisals", to take measures to prevent others from carrying out reprisals, and to protect the population, "including foreign nationals and African migrants".