Libya's transitional government has formally declared the nation liberated, officially ending Moammar Gadhafi's rule just three days after the dictator met a violent end in his hometown of Sirte.

Mustafa Abdul-Jalil, Libya's transitional leader, said the country will use Sharia law as the cornerstone of its legislation, and any laws that oppose Islam's teachings will be wiped clear.

"This revolution was looked after by God to achieve victory," he told a crowd at the declaration ceremony in the eastern city of Benghazi on Sunday.

Abdul-Jalil also called on Libyans to be patient as the nation recovers from a bloody eight-month rebellion that escalated into a civil war. He said all revolutionary fighters would be promoted one rank over their current one, and promised more benefits later.

"Thank you, thank you to the fighters who achieved victory, both civilians and military," he said.

The mood across the country was one of jubilation, despite the fact that Libya faces enormous challenges in the near future, CTV Middle East Bureau Chief Martin Seemungal said.

"One thing that you hear in talking to people in Libya is that everyone is united in the fact that they wanted Moammar Gadhafi to go," he said by phone from Misrata where Gadhafi's body has been on public display in a walk-in freezer.

"They're all on the same page, so to speak," he said, "but this is a country that's been ruled by a dictator who ruled by divide. There's no history of democratic politics here so it's going to take a while to organize that."

Seemungal said there is also an underlying feeling of mistrust among the people to the point where some were questioning why the liberation ceremony was being held in Benghazi, where the revolution began, and not in the capital Tripoli.

As for the democratic future of the country, he added, "It's not going to happen overnight. But clearly there is a collective sigh of relief being breathed today."

In Ottawa, Prime Minister Stephen Harper released a statement lauding the Libyans for standing up to decades of tyranny and promising Canada's help in building a democracy.

"We join Libyans in welcoming the post-Gadhafi era and the transition of the country to a democratic society -- one that respects human rights and the rule of law," the statement said. "Canada will continue to work with transitional leaders as the new Libya takes shape."

U.S. President Barack Obama said that the declaration carried a "new era of promise" for the North African nation, and he called for leaders to focus on the political transition ahead.

But Secretary of State Hillary Rodham Clinton said that a probe should be conducted into the killing of Gadhafi. It isn't clear if the former leader died in a fire fight or if he was executed.