Judges from the International Criminal Court will decide where Saif al-Islam, the son of the slain Libyan leader, Muammar Gaddafi, will face trial, the court's prosecutor has said.
Luis Moreno-Ocampo said on a visit to Tripoli on Wednesday that no matter where his trial is ultimately held, Saif al-Islam will face justice.
"The interesting thing is that the ICC wants to do justice on Saif [and] Libya wants to do justice on Saif, [so] there will be justice for Saif," Moreno-Ocampo said.
Saif al-Islam is wanted by the Hague-based court for crimes against humanity for acts committed during the revolt that eventually toppled Muammar Gaddafi.
Libya says he will be tried in his home country but its new rulers have been unable to prize him out of the hands of the militia fighters who caught him in the southern desert in November.
"The judges of ICC ordered [Libya] to surrender Saif. The Libyan government says they will challenge the admissibility of the case before the end of April and then the judges will decide," Moreno-Ocampo said.
Ahmed al-Jehani, a Libyan lawyer in charge of the case and who liaises between the Libyan government and the ICC, said he was optimistic Moreno-Ocampo's visit would help convince judges to allow Libya to try Saif al-Islam locally.
He faces the death penalty if found guilty by a Libyan court but a prison term if convicted by the ICC.
He is being held in a secret detention centre in Zintan. A delegation of the ruling National Transitional Council (NTC) travelled to the western town on Monday to try to broker a deal.
Khaled Ahmed al-Zintani, a local council spokesman, said the NTC delegation left Zintan without a solution because fighters there believe the government cannot secure Saif al-Islam and are worried he would escape if brought to Tripoli.
He said they called for tighter security in Tripoli before any eventual transfer as well as salaries for their efforts.
Al Jazeera’s Omar al-Saleh, reporting from Tripoli, said the problem is that "neither the ICC nor the NTC has an authority over the rebel brigade that is holding Saif al-Islam, which of course we all know" is the Zintan Brigades.
"The Zintan Brigades say they want to try Saif al-Islam locally at the town of Zintan," he said.
"They fear if they hand over Saif al-Islam to Tripoli, it will be under a weak government and there is a chance that Saif al-Islam might even escape."
For his part, Moreno-Ocampo also said he plans to visit the coastal city of Misrata, where he is investigating rape cases, during his three-day trip.
"We believe we can present a new case there against all the individuals," he said, without specifying whether he meant former rebels or Gaddafi fighters.
Both camps have been accused of committing war crimes in the 2011 conflict.