Colonel Gaddafi's son Saif al-Islam has been arrested in southern Libya, its justice minister is reported to have said.
He was with two aides who were trying to smuggle him out to neighbouring Niger, Libyan militia commander Bashir al-Tayeleb told Associated Press.
He is the last key member of the Gaddafi family in the country.
Saif al-Islam is wanted by the International Criminal Court for alleged crimes against humanity during the uprising against his father.
According to initial reports Saif was caught in the desert town of Obari which is about 400 miles south of Tripoli and was in "good health".
Meanwhile, the BBC reported people shouting in celebration in Tripoli on hearing reports of the capture.
It is not yet clear what will happen to Saif, but commentators have expressed concern that he could face similar treatment to that of his father.
Colonel Gaddafi was filmed being beaten and dragged through the streets before being shot in the head.
Early indications suggest Libya's transitional ruling National Transitional Council will decide on where he would be tried.
Born in 1972, Saif al-Islam Gaddafi is the oldest of seven children of Muammar and Safiya Gaddafi.
He drew Western favour in previous years by touting himself as a liberalising reformer but then staunchly backed his father, Muammar Gaddafi, in his brutal crackdown on rebels in the regime's final days.