A Libyan official visited a prison in rebel-held Tripoli on Monday to meet detainees including a son of slain dictator Moamer Kadhafi, after claims that he was ill-treated in jail.
The visit by Mustafa al-Kulaib, justice minister in the Tripoli-based government, comes after Human Rights Watch called for a probe into reported abuse of prisoners at Al-Hadba prison.
HRW made the request last week after an undated video posted on an Arab news website earlier this month showed prison guards and officials beating up prisoners including Saadi Kadhafi.
"The situation does not really reflect what people are saying," Kulaib said after touring Al-Hadba and speaking to detainees.
Al-Hadba is controlled by the Fajr Libya militia coalition which seized Tripoli last year and is opposed to the internationally recognised government which is based in the east.
Kulaib said he condemns ill-treatment of detainees, but added that if such cases exist they are only "isolated incidents", promising to investigate any abuse.
"We're not saying conditions in this institution or others are perfect, but what we want to say to the world is that we cannot do better at the moment, and we cannot fix the situation in the prisons overnight," he said.
Signup to our newsletter and follow us on Facebook and Twitter!
"We will work firmly against those who commit such acts in the future and will investigate all these isolated incidents."
Kulaib met Saadi, Kadhafi's third-oldest son, who was wearing blue prison uniform, and Kadhafi's last prime minister Al-Baghdadi al-Mahmudi.
In July, a court sentenced to death another Kadhafi son, his one-time heir apparent Seif al-Islam, and eight of his aides including Mahmudi for crimes during the 2011 uprising.
Seif al-Islam, who is also wanted by the International Criminal Court (ICC), was tried in his absence because he is being held by a militia that opposes the Tripoli authorities.
His brother Saadi was extradited in March 2014 from Niger, where he had sought refuge after the 2011 uprising.
Three of Kadhafi's seven sons were killed in the uprising. Kadhafi himself was captured and killed by rebels in October 2011.
Libya plunged into chaos after the uprising and now has two parliaments and two governments vying for power as well as a slew of armed groups battling to control its oil wealth.