(CNN) -- Libyan authorities were granted more time Tuesday by the International Criminal Court to say whether they plan to hand over the deposed leader's son, Saif al-Islam Gadhafi.
The ICC decision came as a deadline loomed for Libya's government to respond on the issue.
The late Moammar Gadhafi's son, once seen as his heir apparent, was captured in November after the fall of his father's regime in August. He is being held in the Libyan city of Zintan.
He was facing an arrest warrant from the ICC at the time of his capture, and the court is still seeking to prosecute him.
The ICC asked Libya last month whether Gadhafi was arrested because of the international warrant, if he was being held incommunicado, and if an ICC representative could meet him.
It also asked when and where a court-appointed expert could examine his physical and mental health, and whether and when they planned to hand him over to the court, giving Libya until January 10 to respond.
That deadline has now been extended to 4 p.m. on January 23, an ICC ruling said.
The ICC took into account "the prevailing political and security situation in Libya" in reaching its decision, it said.
ICC official Fadi Al Abdull had earlier warned that Libyan authorities faced referral to the United Nations Security Council if they did not reply by the Tuesday deadline.
Libyan officials did not immediately reply to a CNN request for comment.
The ICC initially demanded that Libya hand over Gadhafi for trial after his capture, but then opened the possibility that he could be tried in Libya.
ICC prosecutor Luis Moreno-Ocampo said on a visit to Tripoli that Libya had the "right" to try him if it could prove it could do so fairly.
He said Libya could make its case to the ICC judges that they could try him, and the ICC judges would decide.
A Human Rights Watch official visited Gadhafi in December, the organization said.
Libyan government officials appear to be treating him well, and he "had no complaints about the physical conditions of his detention," the group said after being allowed to visit him for 30 minutes.
He should have immediate access to a lawyer, the group said December 21.
Gadhafi's main concern "was the lack of access to family and to a lawyer who can help his case. Saif al-Islam Gadhafi says he is getting good food and medical care," said Fred Abrahams of Human Rights Watch in a statement.
Libya's general prosecutor, Abdelaziz al-Hasadi, said Gadhafi would have access to a lawyer as soon as the authorities prepared a secure detention center for him in Tripoli, according to Human Rights Watch.
The authorities want to protect Gadhafi from attack as well as to make sure supporters cannot free him, Human Rights Watch said the prosecutor told them.
Human Rights Watch said Libya's criminal code required detainees to be given legal counsel.
"The world is watching how Libya handles this case, and Libya should prove that it will grant Gadhafi all the rights that were too often denied in the past," Abrahams said.
At least two of Moammar Gadhafi's children fled Libya as his regime crumbled, and two others have been reported killed.
Aisha Gadhafi fled to Algeria along with several other family members in August. She is a lawyer who assisted in the defense of deposed Iraqi dictator Saddam Hussein, who was hanged in 2006, and a onetime U.N. goodwill ambassador.
Saadi Gadhafi has been granted asylum in Niger.
His brother Khamis Gadhafi, who led an army brigade blamed for the massacre of prisoners in a warehouse outside Tripoli, was killed in a late-August battle in northwestern Libya, rebel commanders said.
Gadhafi's youngest son, Saif al-Arab, was reported killed in a NATO airstrike in April.
CNN's Bharati Naik and Jomana Karadsheh contributed to this report.