Updated

Nicolas Maduro was sworn in Friday as Venezuela's acting president, using the occasion to make blistering attacks on the U.S. as well as the political opposition, which objected that the ceremony violated the country's constitution.

Late President Hugo Chavez designated Maduro as his successor before he died Tuesday of cancer. 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 a presidential election should be called within 30 days.

Maduro has been picked as the presidential candidate of Chavez's socialist party.

Opposition leader Angel Medina said earlier Friday that the opposition would boycott the swearing-in ceremony. Former U.S. presidential candidate, the Rev. Jesse Jackson, attended the ceremony as did Ecuadorean President Rafael Correa.

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 fulfill 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 U.S. 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 touched on Chavez's penchant for slamming "the empire," his term for the United States.

"We tell them: Sooner than later, the imperialist elites who govern the United States will have to learn to live with absolute respect with the insurrectional people of the ... Latin and Caribbean America," he said.

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, opposition leader Henrique Capriles said Maduro had used Chavez's funeral earlier in the day to campaign for the presidency. Capriles is widely expected to run against Maduro in the coming vote.