Opposition head Juan Guaido took an oath swearing himself in as Venezuela's interim president on Wednesday, as hundreds of thousands marched to demand the end of socialist leader Nicolas Maduro's government.

Guaido, head of the opposition-run Congress, had said he would be willing to assume the presidency on an interim basis with the support of the armed forces to call elections.

Within minutes, Global Affairs confirmed Canada will recognize Guaido in the role. Foreign Affairs Minister Chrystia Freeland later issued a statement saying Canada supports Guaido's "commitment to lead Venezuela to free and fair presidential elections" and called on Maduro to cede power.

She added, "Canadians stand with the people of Venezuela and their desire to restore constitutional democracy and human rights in Venezuela."

U.S. President Donald Trump also issued a statement supporting Guaido, and encouraged other Western governments to recognize Guaido as interim president.

Argentina, Brazil, Chile, Colombia, Costa Rica, Guatemala, Honduras, Panama, Paraguay and Peru indicated they too will recognize Guaido. Ecuador joined that list a few hours later.

A spokesperson for Mexico's Foreign Ministry said Mexico does not plan to change its policy on Venezuela "for the time being."

Bolivia's president also affirmed his solidarity with Maduro in a tweet. Cuba, El Salvador and Nicaragua appeared to be standing with Maduro, at least for now.

Opposition supporters take part in a rally Wednesday against Maduro's government and to commemorate the 61st anniversary of the end of the dictatorship of Marcos Perez Jimenez in Caracas. (Adriana Loureiro/Reuters)

Demonstrators clogged avenues in eastern Caracas, chanting "Get out, Maduro" and "Guaido, Presidente" while waving national flags. Police fired tear gas to disperse protesters in several areas.

An Opposition spokesman said seven people had been killed during the day of demonstrations, including four killed by gunfire in the southwestern city of Barinas.

Freddy Superlano said members of the National Guard and police were dispersing protesters at the end of a march when the gunfire erupted. He said another three people were injured.

A spokesperson for the Civil Protection office in the state of Tachira said the number of deaths in unrest in the city of San Cristobal had risen to three.

The opposition has been energized by young congress chief Guaido, who has led a campaign to declare Maduro a usurper and has promised a transition to a new government in a nation suffering a hyperinflationary economic collapse.

Guaido, in a speech before a cheering crowd, took an oath swearing himself in as interim president.

Guaido greets supporters after taking an oath to be Venezuela's interim president. (Carlos Garcia Rawlins/Reuters)

"I swear to assume all the powers of the presidency to secure an end of the usurpation," he said.

He has said he would be willing to replace Maduro with the support of the military and to call free elections.

"We know that this will have consequences," he shouted, moments before quickly slipping away to an unknown location amid speculation he would soon be arrested.

In response, Maduro announced Venezuela is cutting ties with the United States. He has given U.S. diplomatic personnel 72 hours to leave the country.

"Before the people and nations of the world, and as constitutional president … I've decided to break diplomatic and political relations with the imperialist U.S. government," Maduro told a crowd of red-shirted supporters gathered at the presidential palace.

While both countries operate embassies in each other's capitals, neither has had an ambassador since 2010.

In a statement, Guaido urged all foreign embassies in the country to disobey Maduro's orders and not remove their diplomats.

U.S. Secretary of State Mike Pompeo followed by saying Washington won't pull its diplomats out of Venezuela, and will instead abide by Guaido's directive.

Maduro, standing on a balcony, attends a rally in support of his government. (Miraflores Palace/Handout/Reuters)

Maduro also called on the country's military to maintain unity and discipline, after the leader of the opposition-controlled congress declared himself interim president and asked for the armed forces' support.

"We will triumph over this as well, we will come out victorious," Maduro told supporters outside the Miraflores presidential palace in Caracas.

Asked if he would send the U.S. military into Venezuela, Trump said on Wednesday that all options are on the table.

"We're not considering anything, but all options are on the table," he told reporters at the White House.

U.S. President Donald Trump speaks to reporters in the Roosevelt Room of the White House Wednesday. (Kevin Lamarque/Reuters)

Socialist party boss Diosdado Cabello is calling on government supporters to mobilize in front of Venezuela's presidential palace to protect Maduro from what he is calling a U.S.-led conspiracy to remove him from power.

"The Bolivarian revolution doesn't have an expiration date," he told a crowd of red-shirted supporters at a rally in downtown Caracas.

National Constituent Assembly (ANC) President Diosdado Cabello gives his speech as he participates in a rally in support of Maduro's government Wednesday. (Fausto Torrealba/Reuters)

"We are going to stay in the streets, and stay in battle, for now and forever," Cabello said, marking the government's first reaction to opposition leader Juan Guaido's decision to declare himself interim president.

Pompeo earlier called on Maduro to step aside and urged the country's military to support efforts to restore democracy.

In a statement, he said Washington would support opposition leader Juan Guaido as he establishes a transitional government and prepares the country for elections.

"The Venezuelan people have suffered long enough under Nicolas Maduro's disastrous dictatorship," Pompeo said. "We call on Maduro to step aside in favor of a legitimate leader reflecting the will of the Venezuelan people."

The Trump administration told U.S. energy companies it could impose sanctions on Venezuelan oil as soon as this week if the political situation worsens, according to sources.

A National Police officer fires rubber bullets during the protest against Maduro in Caracas. (Manaure Quintero/Reuters)

Maduro was inaugurated on Jan. 10 to another term in office following a widely boycotted election last year that many foreign governments described as a fraudulent. His government accuses Guaido of staging a coup and has threatened him with jail.

Any change in government in Venezuela will rest on a shift in allegiance within the armed forces, which has stood by Maduro through two waves of street protests and a steady dismantling of democratic institutions.

Chavez statue toppled

"We need freedom, we need this corrupt government to get out, we need to all unite, so that there is peace in Venezuela," said Claudia Olaizola, a 54-year-old salesperson near the march's centre in the eastern Chacao district, a traditional opposition bastion.

In a potent symbol of anger, demonstrators in the southern city of Puerto Ordaz on Tuesday toppled a statue of late socialist leader Hugo Chavez, broke it in half and dangled part of it from a bridge.

A 16-year-old was shot to death at a protest on Tuesday in western Caracas, according to a rights group, Venezuelan Observatory of Social Conflict. Three people were shot dead on Tuesday night in southern Bolivar City during a looting of a grocery store that followed a nearby protest, Bolivar state Gov. Justo Noguera said in a telephone interview.

Maduro has presided over Venezuela's spiral into its worst-ever economic crisis. His re-election in 2018 was widely viewed as a sham due to widespread election irregularities.

"We've come out to support the opposition and preserve the future of my son and my family, because we're going hungry," said Jose Barrientos, 31, an auto-parts salesperson in the poor west end of Caracas.