U.S. President Barack Obama on Thursday said now that Moammar Gadhafi is dead, Libya has an opportunity to determine its own destiny.

The Libyan government announced Gadhafi's death on Thursday after the ousted dictator was killed in what the interim Prime Minister said was crossfire between transitional government troops and those loyal to Gadhafi.

This marks the end of a long and painful chapter for the people of Libya, who now have the opportunity to determine their own destiny in a new and democratic Libya, Obama said in a statement following the deposed leader's death.

Obama said for 40 years, the Gadhafi regime ruled Libya with an iron fist.

Basic human rights were denied, Obama said. Innocent civilians were detained, beaten and killed. And Libya's wealth was squandered. The enormous potential of the Libyan people was held back, and terror was used as a political weapon... The last major regime strongholds have fallen.

A NATO official told CNN that Gadhafi's death occurred after he survived a NATO airstrike on a convoy in the area. A spokesman for a member of the Tripoli military council also told CNN that one of Gadhafi's sons, Mutassim, and the dead leader's Chief of Intelligence Abdullah al-Senussi have also been killed.

There were conflicting reports early on Thursday on exactly how Gadhafi was killed.

Mahmoud Jibril, Libya's transitional Prime Minister, told the media that Gadhafi was captured alive and unharmed when troops from the National Transitional Council invaded his hometown of Sirte on Thursday. The council and Gadhafi's loyalists began trading gunfire when Gadhafi's captors tried to get him on board a vehicle, leaving the dead leader with a wound to his right arm.

As the vehicle drove away, more shooting began and Gadhafi took a bullet to the head, Jibril said.

Gadhafi succumbed to the injury before arriving at a hospital in Misrata, Jibril said. He was citing the city's coroner.

Two videos have surfaced apparently showing Gadhafi's last moments before death. One video aired by Al Jazeera Arabic shows a man, who looks like Gadhafi, wounded but still alive, being hauled off while surrounded by fighters.

News agency Agence France-Presse also released a photo showing a wounded man that appeared be the dictator.

Another video aired by Al Jazeera later showed Gadhafi's lifeless body.

Gadhafi ruled Libya for nearly 42 years, but was overthrown by rebels forces back in August.

When news of his death was confirmed by Jibril, many Libyans took to the streets cheering into the early hours of Friday morning local time.

This is a time to start a new Libya, with a new economy, with a new education and with a new health system -- with one future, Jibril said, as reported by CNN.

Obama said Libya's new government is consolidating the control over the country. He added that a year ago the notion of a free Libya seemed impossible.

But then the Libyan people rose up and demanded their rights, Obama said. And when Gadhafi and his forces started going city to city, town by town, to brutalize men, women and children, the world refused to stand idly by.

Amnesty International has since called upon the National Transitional Council to make public the information about how Gadhafi died, making the full facts available to the Libyan people.

Amnesty said it is essential to conduct a full, independent and impartial inquiry to establish the circumstances of Col. Gadhaffi's death.

Ensure that all those suspected of human rights abuses and war crimes, including Col. Gadhafi's inner circle and family members, are treated humanely and, if captured, given fair trials, Amnesty stated in a press release.

In the meantime, Obama said the Libyan people are left with a great responsibility to build an inclusive and tolerant and democratic Libya that stands as the ultimate rebuke to Gadhafi's dictatorship.

He also said the U.S. is looking forward to hearing that the country has been liberated and having its first free and fair elections.

We're under no illusions -- Libya will travel a long and winding road to full democracy, Obama said. There will be difficult days ahead. But the United States, together with the international community, is committed to the Libyan people. You have won your revolution. And now, we will be a partner as you forge a future that provides dignity, freedom and opportunity.