Nicolas Maduro has been sworn in as Venezuela's acting president following the funeral of late president Hugo Chavez, against the objections of the political opposition who say the move violates the country's constitution.
Chavez designated Maduro as his successor before he died Tuesday. Maduro had been Chavez's vice-president.
The country's 1999 constitution says the National Assembly speaker becomes interim president in the event of a president-elect's death or inability to be sworn in. The constitution also says new elections should be called within 30 days.
Maduro, who has been picked as the presidential candidate for Chavez's socialist party, is expected to face Henrique Capriles, who lost to Chavez in Venezuela's last presidential election.
Stray fireworks exploded above the capital of Caracas as soon as Maduro was sworn in as president.
Both Maduro and National Assembly President Diosdado Cabello pledged to follow Chavez's example and push his socialist-inspired agenda.
"I swear by the most absolute loyalty to comrade Hugo Chavez that we will fulfil and see that it's fulfilled the constitution ... with the iron fist of a people ready to be free," Maduro said.
He also echoed accusations he made shortly before Chavez's death that the United States had caused the fatal cancer. On Friday night, he referred to "this illness very strange for the speed of its growth and for other scientific reasons that will be known in their moment."
He later named Science and Technology Minister Jorge Arreaza, Chavez's son-in-law, as his vice-president. Arreaza had frequently been at the side of the dying president in his final weeks, sometimes providing updates about his health.
Shortly before the swearing-in, Capriles said Maduro had used Chavez's funeral earlier in the day to campaign for the presidency.
Chavez, 58, died after a long battle with an undisclosed cancer in the pelvic region, apparently suffering a massive heart attack on Tuesday.
But the Venezuelan opposition says it did not attend the swearing-in, calling it "a violation of the constitutional order."
The swearing-in is believed to be contrary to Venezuela's constitution, which calls for the speaker of the National Assembly, currently Diosdado Cabello, to assume the position if a president cannot be sworn in.
Opposition spokesman Angel Medina said he was also concerned about the location of the ceremony, which happened at the same military academy as the state memorial for Chavez and where his body will continue to lie in state. He said it set a bad precedent because the military should play no role in politics.
While dignitaries paid their condolences inside the military academy, thousands of Venezuelans mourned their leader outside of the exclusive state memorial.
The funeral was scheduled to start at 11 a.m. local time (10:30 a.m. ET). However, it began late, with dignitaries arriving up to 45 minutes after the scheduled start time.
After announcing each of the dignitaries — including leaders from many allied countries —the congregation stood as Venezuela's national anthem filled the military academy where Chavez's body has been lying in state for the past two days.
"Viva Chavez," was the message following the anthem.
A huge pro-Chavez crowd gathered outside of the military academy where the state memorial was to be held, the CBC's Paul Hunter reported from Caracas.
"The atmosphere is set by Chavistas," he said from outside the academy's doors, referring to the name Chavez's supporters are given. "[They are] effectively cheering on the funeral."
He said the most emotional moment was the singing of the national anthem, which the crowd participated in. Some people in the crowd had tears streaming down their faces, he said, and others pumped their fists or saluted.
As various presidents were called to stand beside Chavez's flag-draped casket, the crowd would cheer loudly for their former leader's allies. Iranian President Mahmoud Ahmadinejad received the loudest accolades, said Hunter.
Anti-Chavez Venezuelans have not descended upon the academy in high numbers, said Hunter, though a few were present. For the most part, he said, they respect that the memorial is a historic moment for the country.
Politicians from around the world, spanning five continents, have been arriving in Caracas over the past few days.
Thirty-three heads of government were expected at the funeral, many from Central and South American countries. The presidents of Argentina, Uruguay and Bolivia were some of the first to arrive, joining local mourners on Wednesday as Chavez's body was moved from the hospital where he died to the military museum in a lengthy street procession.
Canada was represented by Bob Dechert, the parliamentary secretary to the Minister of Foreign Affairs, and the Canadian ambassador to Venezuela.
Former prime minister Jean Chrétien is also attended the funeral. "[Chavez] was a very colourful politician who had very different policies than many of us," Chrétien told CBC shorty after Chavez's death.
"He did his best, even if we did not agree many times on the issues."
Venezuelans have criticized Prime Minister Stephen Harper for his response to Chavez's death, which the local government called insensitive. Harper issued a statement offering his condolences to Venezuelans, but not Chavez's family.
"At this key juncture, I hope the people of Venezuela can now build for themselves a better, brighter future based on the principles of freedom, democracy, the rule of law and respect for human rights," Harper's statement said.
Chavez's body will lie in state for at least seven more days, before being embalmed and permanently displayed at the Museum of the Revolution, Venezuela's interim president, Nicolas Maduro, announced Thursday. Chavez will join leaders such as China's Mao Zedong and Russia's Vladimir Lenin, who are also on permanent display in their home countries.
At first, the government wanted to rest his body in a mausoleum reserved for historical figures, said Hunter. However, the constitution says that cannot be done until 25 years after the person's death.
Chavez's body has been lying in state since soon after he died from an apparent heart attack Tuesday.
"We are tired here, but, we want to see Chavez," one person in the queue told him.
The government estimates some two million Venezuelans have visited Chavez during the two days his body has been on display.With files from Tom Parry, The Associated Press, The Canadian Press