(CNN) -- Libya's government on Tuesday appealed a request from the International Criminal Court to hand over Saif al-Islam Gadhafi, saying it should be given more time to make its own case.
Gadhafi, son of deposed strongman Moammar Gadhafi, was facing an arrest warrant from the ICC for alleged crimes against humanity at the time of his capture, and the court is still seeking to prosecute him.
Officials with the ICC, based at The Hague in the Netherlands, said Thursday that Libya must make arrangements to hand him over immediately. He has been held in the Libyan city of Zintan since his capture in November.
But the Libyan government said in its appeal filing Tuesday that legally, the ICC was wrong to turn down its request for a postponement to surrender Gadhafi.
Libyan authorities intend to file a challenge to the ICC case, which should be considered before it's decided when he must be handed over, the appeal document says.
The Libyan government wants to prosecute Gadhafi itself, as it "regards the trial of Saif al-Islam and Abdullah al-Senussi as a matter of the highest national importance, not only in bringing justice for the Libyan people but also in demonstrating that the new Libyan justice system is capable of conducting fair trials (that meet all applicable international standards) in complex cases," it says.
Al-Senussi, who was Libya's chief of intelligence under the Gadhafi regime, is wanted by both the ICC and the Libyan government. He was arrested in Mauritania last month.
The appeal document also seeks to answer ICC concerns about Saif al-Islam Gadhafi's well-being, saying the government "has expended considerable resources in order to ensure the safe and secure temporary custody" of Gadhafi in Zintan and is negotiating to bring him to the capital, where facilities would be better.
ICC defense lawyers said last week that the son of Libya's deposed leader has been mistreated and "physically attacked" since his capture.
Gadhafi is in a "legal black hole," held for 139 days in "total isolation" except for visits from officials, his ICC-appointed defense said in a strongly worded statement.
He also suffers dental pain because he hasn't had treatment, and Libyan authorities have given him nothing to remedy the pain, lawyers Xavier-Jean Keita and Melinda Taylor said.
"At no point have the Libyan authorities been legally justified in their failure to surrender him to the ICC," the lawyers said.
"The brutal death of Moammar Gadhafi deprived the Libyan people of their right to justice and their right to the truth. It would be a travesty for the prospects of a free and fair Libyan state if the same were to occur to his son," they said.
Keita said Gadhafi had also been given misleading information about the severity of the allegations against him.
ICC prosecutor Luis Moreno-Ocampo said it is possible that the court will allow Libya to proceed with its case if the Libyans explain their plans.
"According to the rules, Libya has the primacy to prosecute Saif, so if they present this to the International Criminal Court judges, probably they will get an approval," Moreno-Ocampo said Thursday. "That's the system. The system is the primacy for the national judges."
Amnesty International called on Libya to hand over Gadhafi at once in light of the ICC statement.
"An unfair trial before a Libyan court where the accused could face the death penalty is no way to guarantee justice and accountability," the rights group said.
Amnesty said Libya did not have a functioning court system and the country was "unable to conduct effective investigations," so "the ICC will be crucial in delivering accountability in Libya."
Libya and the ICC have been going back and forth since his capture about where Saif al-Islam Gadhafi, once his father's heir apparent, will be tried.
After visiting Gadhafi in custody last year, Human Rights Watch said that he should have a lawyer. But Interior Minister Fawzy Abdilal implied in February that he had not asked for one.
"He may have a lawyer if he asks for a lawyer," the interior minister told CNN. "Should Saif demand a lawyer, then a lawyer would be provided."
Moammar Gadhafi died after his capture by opposition forces last October.
CNN's Bharati Naik and Jomana Karadsheh contributed to this report.