Tripoli, Libya (CNN) -- Libyans celebrated late into the evening Saturday the reported capture of Moammar Gadhafi's son, Saif al-Islam, nabbed in a desert gunbattle after an 18-day stakeout.
Senior Libyan military officials said they believe the potential Gadhafi successor was trying to make his way to neighboring Niger, where a brother, Saadi, was granted asylum.
Revolutionary fighters caught the man wanted by the International Criminal Court between the southwestern oasis town of Obari and southern town of Sabha, military commanders in Tripoli told CNN.
The 39-year-old, the last Gadhafi fugitive, was taken to the city of Zintan in the western mountains. Top officials in the town rejoiced over the development.
Saif al-Islam had been on the run since shortly after the fall of his father's Bab al-Aziziya compound in the capital in August.
"I hope that this is the beginning of a state of freedom, transparency and lawfulness," acting Prime Minister Abdurrahim El-Keib told reporters in Zintan. "In the name of the great nation, we would like to allay your fears and tell you that Saif and those who were with him will be tried fairly. They are ensured all their rights under the law. These are the same rights that our nation didn't have for 42 years."
The ICC in the Netherlands wants Saif al-Islam for alleged crimes against humanity, including murder, committed during the uprising this year.
But officials in Libya also indicated they would like to put Saif al-Islam on trial.
Although he held no high-level government office, Saif al-Islam was considered by ICC prosecutors to be Moammar Gadhafi's "unspoken successor and the most influential person with his inner circle," according to an arrest warrant issued in June.
The Gadhafi regime formulated a state policy that included quelling demonstrations by lethal force, attacking civilians and imprisoning hundreds, according to the warrant. Saif al-Islam "exercised control over crucial parts of the state apparatus, including finances and logistics and had the powers of a de facto prime minister."
ICC Chief Prosecutor Luis Moreno-Ocampo said the arrest was "good news."
"That is very important because we consider him -- the judges consider him -- the principal, with his father Moammar, of the crimes committed in Libya after February 13," he said. "He's arrested, he's alive, and now he will face justice and that is the most important news."
Moreno-Ocampo will travel to Libya next week to coordinate efforts to bring Saif al-Islam to justice, an ICC spokeswoman said Saturday.
"The ICC has had indirect contact with Saif al-Islam Gadhafi through intermediaries during which they discussed what would happen if he surrendered. The last contact was 25 days ago," spokeswoman Florence Olara told CNN.
ICC spokesman Fadi el-Abdallah told CNN that Libya has an obligation to surrender Saif al-Islam to the ICC. If Libya wants to conduct a trial, it needs to submit a request to judges and show its legal system is capable of properly handling such a proceeding.
El-Keib emphasized that "we will deal with this under our legal system," but he said the country intends to communicate and work with the ICC.
"We'll get to a point where we can take care of this issue easily," El Keib said. "We definitely are interested in respecting the will of our people and also the national interests that we trust that the world will also appreciate."
Justice Minister Mohammad Al-Alagy said he doubts Libyan courts would want to try Saif al-Islam for crimes against humanity.
"We will weigh out the accusations against Saif Al Islam al-Gadhafi. Afterward, we will know what crimes to try him with. He's charged with killing and taking the nation's money and ... hiring mercenaries. Those are crimes the Libyan nation will currently try him for. We can't move ahead of ourselves with inaccurate accusations. We will move forward with this investigation."
Military commanders told CNN they want the National Transitional Council to ensure Saif al-Islam is tried in their country.
Outbursts of celebratory gunfire, the honking of horns and cries of joy could be heard in Tripoli as reports of his capture spread.
Othman Mliegta, commander of the Al Qa'aq brigades, said he had been told that Saif al-Islam was slightly injured in the clashes that took place when the fighters attempted to capture him but is in good health.
A picture released by Libya's National Transitional Council purportedly of Saif al-Islam appeared to show him half-lying on a low bed with bandages wrapped around the fingers of his right hand.
A military commander from Zintan, Fathi Al-Ayed, told CNN that the injuries had been sustained in previous clashes rather than the firefight that led to his capture in the early hours of Saturday.
Al-Ayed, who was in Obari at the time, said fighters from the Zintan Brigades had been following a vehicle convoy. As they approached, the convoy tried to flee, firing on the fighters, who returned fire.
When the convoy was eventually stopped, Saif al-Islam was arrested, along with up to six others. They were taken to Zintan.
Mliegta said those with Saif al-Islam when he was caught did not include his father's former intelligence chief Abdulla al-Sanussi, also wanted by the ICC.
French and British officials, part of the NATO mission that supported the rebels since February, welcomed the capture.
"Saif al-Islam no longer poses a threat to peace and security in Libya," said British Foreign Secretary William Hague. "His arrest will allow the Libyan people to move on to the challenge of rebuilding their country."
The suspect's father, who ruled the country for more than 40 years, was killed last month near Sirte after his capture by forces loyal to the National Transitional Council.
Asked about guarantees of Saif al-Islam's safety, Mliegta said he would be treated in the same way as any other detainee.
National Transitional Council military liaison Abdelrahman Busin told CNN that any injuries Saif al-Islam had sustained would be treated.
There was still some secrecy over his movements, Busin said, but he could guarantee Saif al-Islam's human rights would be respected if he is handed over to authorities in Tripoli.
Giving his reaction to the news of the arrest, Busin said: "I think the Libyan people can finally actually breathe a big sigh, finally relax to some extent, because he has been threatening to come back with revenge for some time now. So, it's a close for many, many people."
Once seen as a possible successor to his father and an advocate of reform, Saif al-Islam Gadhafi became a vocal defender of his father's brutal regime.
His whereabouts had been unknown for months. At the end of August he made a call to Syria's Rai TV, in which he said he was speaking from a suburb of the capital, Tripoli, and urged Libyans to rise up against the rebels.
Saif al-Islam, whose mother is Gadhafi's second wife, Safia, is the second-oldest son of the late strongman. He was educated at the London School of Economics and speaks fluent English.
CNN's Kareem Khadder and Matthew Chance contributed to this report.