Nicolás Maduro claimed his troops have thwarted a botched attempt to topple him masterminded by Venezuela’s “coup-mongering far right” and Donald Trump’s deranged imperialist “gang” – while on Wednesday morning the US secretary of state, Mike Pompeo, said US military action in the country was a possibility “if required”.

Maduro gave an hour-long address to the Venezuelan nation on Tuesday night – his first since the pre-dawn uprising began – in which he accused the opposition leader, Juan Guaidó, and his political mentor, Leopoldo López, of seeking to spark an armed confrontation that might be used as a pretext for a foreign military intervention.

However, “loyal and obedient” members of Venezuela’s Bolivarian armed forces had put down the mutiny within hours of it starting shortly after 4am on Tuesday, Maduro claimed, in direct contradiction to Guaidó’s earlier remark that the president no longer had military backing.

Venezuela crisis: Maduro claims coup has been 'defeated' – live updates Read more

By noon there only remained a small group of plotters who had chosen “the path of betrayal … [and] handed their souls over to the coup-mongering far right”, Maduro said.

But on Wednesday morning, Pompeo spoke out on US TV, having previously claimed that Maduro had been on the verge of fleeing to Cuba, to say that the US would prefer a peaceful transition of power in Venezuela but that he was prepared to consider military intervention to stem the turmoil.

“Military action is possible. If that’s what’s required, that’s what the United States will do,” Pompeo said in an interview with Fox Business Network.

Meanwhile Guaidó has insisted that “a peaceful rebellion”, not an attempted military coup, was under way and urged supporters to return to the streets on Wednesday to continue what he called the final stage of “Operation Freedom”. He said Venezuelans had the opportunity “to conquer their future” and pledged that the march would be the largest in the country’s history.

In what could result in a flashpoint between the two sides on Wednesday, Maduro also called for his supporters to stage “a large, millions-strong march of the working class” on 1 May, which is also international workers’ day.

On Wednesday morning, the Spanish government confirmed that López, who had been freed from house arrest to help lead the uprising, was now in the residence of Spain’s ambassador to Caracas.

“We can confirm that the opposition leader Leopoldo López and his wife and daughter are in the residence of the Spanish ambassador in Caracas,” said a government spokeswoman.

She said that López and his family has not requested asylum as yet.

Maduro said the plotters would “not go unpunished” and said they would face criminal prosecutions “for the serious crimes that have been committed against the constitution, the rule of law and the right to peace”.

“They failed in their plan. They failed in their call, because the people of Venezuela want peace,” Maduro said, surrounded by Venezuela’s military and political elite. “We will continue to emerge victorious … in the months and years ahead. I have no doubt about it.”

Caracas map Caracas map

Those claims were contradicted by Guaidó, the young opposition leader who has been battling to unseat Maduro since January. In a video message of his own – recorded at an unknown location – Guaidó claimed Maduro no longer enjoyed the backing or the respect of Venezuela’s armed forces.

Facebook Twitter Pinterest Venezuela’s president, Nicolás Maduro, at the Miraflores palace next to the defence minister, Vladimir Padrino, in Caracas, on Tuesday. Photograph: HO/AFP/Getty Images

Maduro called Tuesday’s “coup-mongering adventure” part of a US-backed plot to destroy the Bolivarian revolution he inherited after Hugo Chávez’s death in 2013.

“I truly believe … that the United States of America has never had a government as deranged as this one,” he said, calling Guaidó and his team “useful idiots” of the empire.

He also scotched claims from Pompeo that he had been preparing to flee Venezuela for Cuba on Tuesday morning, until he was told to stay put by his Russian backers.

“Señor Pompeo, please,” Maduro said.

In a day when the struggle for power on the streets appeared to hang in the balance, Donald Trump made no mention of Russia when he tweeted on Tuesday evening, threatening Cuba.

“If Cuban Troops and Militia do not immediately CEASE military and other operations for the purpose of causing death and destruction to the Constitution of Venezuela, a full and complete embargo, together with highest-level sanctions, will be placed on the island of Cuba,” Trump said in a series of tweets. “Hopefully, all Cuban soldiers will promptly and peacefully return to their island!”

The Trump administration put its full backing behind Guaidó after he appeared in a dramatic morning video surrounded by soldiers the “final phase” of the bid to oust Maduro.

Trump and key US officials tweeted their support for Guaidó, while the national security adviser, John Bolton, appeared in the grounds of the White House to declare that the situation had reached a critical moment.

Bolton named three senior officials who he said had been negotiating with the opposition and accepted that the president had to be replaced.

Bolton called on the defence minister, Vladimir Padrino, head of the supreme court, Maikel Moreno, and the commander of the presidential guard, Iván Rafael Hernández Dala to fulfil their “commitments” to defect.

Play Video 1:53 Venezuela: a day of chaos and violence after Juan Guaidó calls for military uprising - video report

He listed the names three times, in a gambit apparently designed to force their hand but the Venezuelan foreign minister, Jorge Arreaza, replied: “Dream on [John Bolton] … Not today!”

According to a source close to Venezuela’s opposition, Guaidó did not receive US planning support or resources for his move on Tuesday, which came after months of contacts with military officials, the source said.

But the opposition has nurtured links with Washington since well before Guaidó took the political center-stage in January – and such efforts took on a new impulse after Trump took office.

Additional reporting by Sam Jones