Venezuela's embattled leader Nicolas Maduro severed relations with the United States and ordered American diplomats out of the country, accusing Washington of orchestrating a coup d'etat after an opposition leader publicly announced he was now president.

In a televised broadcast from the presidential palace late on Wednesday, Maduro accused the opposition of seeking to stage a coup with the support of the US, which he said was seeking to govern Venezuela from Washington.

"We've had enough interventionism, here we have dignity, damn it," said an angry Maduro.

"Here is a people willing to defend this land," said the beleaguered leader, flanked by top Socialist Party officials as riot police clashed with opposition supporters in the capital.

Earlier on Wednesday, Venezuelan opposition leader Juan Guaido declared himself interim president in an address to tens of thousands of people on the streets of Caracas.

At the mass rally, Guaido accused Maduro of usurping power and promised to create a transitional government that would help the country escape its hyperinflationary economic collapse.

"I swear to assume all the powers of the presidency to secure an end to the usurpation," Guaido, 35, head of the opposition-run congress, told an exuberant crowd.

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

Unchartered territory

The avalanche of support for Guaido dramatically raised the stakes in Venezuela, an oil-rich nation that has become deeply impoverished under Maduro.

Guaido's declaration takes Venezuela into uncharted territory with the possibility of the opposition now running a parallel government recognised abroad as legitimate - but without control over state functions.

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

Venezuelan Defence Minister Vladimir Padrino said the armed forces did not recognise a self-proclaimed president "imposed by shadowy interests ... outside the law". The military's top brass indicated their continued support for Maduro on Twitter.

Just minutes after Guaido's declaration, US President Donald Trump recognised him as interim leader, and declared his National Assembly was "the only legitimate branch of government duly elected by the Venezuelan people".

"The people of Venezuela have courageously spoken out against Maduro and his regime and demanded freedom and the rule of law," Trump said in a statement.

Major regional players Brazil, Colombia, Chile, Peru and Argentina all gave their backing to Guaido's self-proclamation as acting president.

Mexico, however, said relations with Venezuela remain unchanged, and Cuba and Bolivia sprang to the defence of their socialist ally.

Maduro fired back by breaking diplomatic relations with the US - the biggest trading partner for the oil-exporting country - and ordering American diplomats to get of the country within 72 hours.

Washington said it would ignore the order with the US State Department saying "former president Maduro" did not have the authority to sever relations.

The socialist leader recalled the long history of heavy-handed US interventions in Latin America during the Cold War as he asked his allies for support.

"Don't trust the gringos," he thundered to a crowd of red-shirted supporters gathered at the presidential palace. "They don't have friends or loyalties. They only have interests, guts and the ambition to take Venezuela's oil, gas and gold."

Maduro has clung to power through the support of the Venezuelan military, and he is an ally of Russia, which last month sent two nuclear-capable bombers to the country to participate in military manoeuvres.

Russian officials and senior lawmakers reacted angrily on Thursday to the events in Venezuela.

Alexei Pushkov, chairman of the information committee at the Federation Council, called Guaido's declaration "an attempted coup" backed by the US.

"It's impossible to imagine that this was spontaneous," Pushkov said on state-owned Rossiya 24 television station. "That was a pre-planned action and it was certainly coordinated by the United States."

Turkey also expressed concern over the developments.

"There is an elected president and another person declares himself president, and some countries recognise this. This may cause chaos," Foreign Minister Mevlut Cavusoglu told the A Haber news channel.

Spokesman Ibrahim Kalin tweeted earlier that Turkey's President Recep Tayyip Erdogan told Venezuela's president: "'My brother Maduro! Stay strong, we are by your side.'"

US Secretary of State Mike Pompeo called on the Venezuelan military to protect "the welfare and well-being of all Venezuelan citizens", along with US citizens in Venezuela. Pompeo said the United States would take "appropriate actions" against anyone who endangered the safety of US personnel.

The US would conduct its diplomatic relations with Venezuela through "the government of interim President Guaido", he added.

Regional support

Brazilian President Jair Bolsonaro, a far-right former paratrooper who has set about forging close ties with the Trump administration since taking power this month, has repeatedly vowed to challenge Maduro any way he can.

"Brazil recognises Mr Juan Guaido as Venezuela's interim president. Brazil will support politically and economically the process of transition so that democracy and social peace return to Venezuela," Bolsonaro said on Wednesday.

Colombian President Ivan Duque, another US ally, told reporters his country was behind Guaido and would "accompany this process of transition to democracy so that the Venezuelan people free themselves of their dictatorship".

Canadian Foreign Minister Chrystia Freeland expressed her country's "full support" for Guaido, adding: "It's an important day for Venezuela."

Maduro took power in 2013 after his mentor, leftist firebrand Hugo Chavez, died. As the oil price sank and revenues dried up, the social welfare programmes designed by Chavez faltered badly.

Venezuela spiralled into its worst-ever economic crisis, with hyperinflation forecast to reach 10 million percent this year. Millions have fled the country in recent years to escape food shortages.

In a potent symbol of Venezuelan anger, demonstrators in the southern city of Puerto Ordaz on Tuesday toppled a statue of Chavez and dangled part of it from a bridge.

New wave?

Maduro started a second term on January 10 following a widely boycotted election last year that many foreign governments described as a sham.

Thirteen people have so far died across Venezuela in clashes with police this week and authorities have arrested 59 people since Monday, according to local officials and rights groups.

Wednesday's protest was the biggest demonstration since a wave of unrest that left more than 120 dead in 2017.

On Caracas' streets, protesters wielding rocks and clubs clashed with police.

"We're hungry. Look how skinny I am: there's no food in my house," said one young man in Chacao district, holding a Molotov cocktail. He declined to give his name. "We have to get rid of Maduro."

Elsewhere in Chacao, a traditional opposition bastion, a dozen protesters spoke of a renewed confidence in dislodging Maduro and predicted a new wave of demonstrations.

Many said they had protested in previous years but lost hope as Maduro tightened his grip on power. Some three million Venezuelans have fled abroad over the past five years to escape widespread shortages of food and medicine.

"The struggle will be long," said Ciro Cirino on Altamira plaza, minutes after police on motorbikes charged at a crowd of several thousand protesters, firing tear gas to disperse them.

"The police push us back - once, twice, three times - and we keep going back. We are going to be here until there is a change," said Cirino, a 35-year-old computer programmer.

Venezuela's constitution says if the presidency is determined to be vacant, new elections should be called in 30 days and the head of the congress should assume the presidency in the meantime.

However, its Supreme Court has ruled all actions taken by the National Assembly congress are null and void, and the government has jailed dozens of opposition leaders and activists for seeking to overthrow Maduro through violent street demonstrations in 2014 and 2017.

What now?

On Thursday, attention will shift to Washington where diplomats at the Organization of American States will hold an emergency meeting on the Venezuelan situation. The debate promises to be charged, and the National Assembly's newly picked diplomatic envoy will be lobbying to take Venezuela's seat from Maduro's ambassador.

Meanwhile, many Venezuelans will be looking for Guaido to re-emerge and provide guidance on the opposition's next steps.

The armed forces' top command is also expected to issue a statement, although nobody expects the generals' loyalties to Maduro to have shifted.

"While it's true that Guaido has been recognised internationally, the real power of the state is still in the hands of Nicolas Maduro," said Ronal Rodriguez, a political science professor who focuses on Venezuela at Rosario University in Bogota.