Venezuela has charged two former US soldiers with terrorism and conspiracy for allegedly taking part in a failed bid to topple President Nicolas Maduro, the attorney general said on Friday.

Luke Alexander Denman, 34, and Airan Berry, 41, were among 17 people captured by the Venezuelan military, which said it had thwarted an attempted invasion by mercenaries in the early hours of Sunday.

Attorney General Tarek William Saab said they had been charged with "terrorism, conspiracy, illicit trafficking of weapons of war and (criminal) association," and could face 25-30 years in prison.

Eight attackers were reportedly killed in the incident.

Saab said Venezuela had requested an international arrest warrant for the capture of former US army medic Jordan Goudreau, who allegedly organized and trained the mercenary force.

Maduro has accused President Donald Trump of being behind the alleged invasion -- and Saab said Friday the Venezuelans involved would be tried for "conspiracy with a foreign government."

Trump has roundly rejected the accusation, telling Fox News on Friday: "If I wanted to go into Venezuela I wouldn't make a secret about it."

"I'd go in and they would do nothing about it. They would roll over. I wouldn't send a small little group. No, no, no. It would be called an army," he said. "It would be called an invasion."

Venezuela said on Monday it had arrested the two former US special forces soldiers and on Wednesday Maduro, who showed the pair's passports on state television, said they would be tried.

The US army has confirmed they were former members of the Green Berets who were deployed to Iraq.

Secretary of State Mike Pompeo said the US government would "use every tool that we have available to try to get them back."

Venezuela President Nicolas Maduro had vowed two Americans would face trial for allegedly being part of a mercenary force that tried to invade the South American country
Venezuela President Nicolas Maduro had vowed two Americans would face trial for allegedly being part of a mercenary force that tried to invade the South American country Venezuelan Presidency / Marcelo Garcia

Maduro described the raid as a "remake" of the failed 1961 Bay of Pigs invasion, when Cuban exiles covertly financed and directed by the US government attempted to overthrow then Cuba leader Fidel Castro.

Announcing the arrests, Saab said Venezuela's opposition leader Juan Guaido, who is backed in his challenge to Maduro's authority by the United States and more than 50 other countries, was behind the mission.

Saab accused Guaido of signing a $212 million contract with "hired mercenaries" using funds seized by the US from the state oil company PDVSA.

On Friday the attorney general said arrest warrants had also been requested for US-based Venezuelans Juan Jose Rendon and Sergio Vergara.

Rendon, an advisor to Guaido, admitted in an interview with CNN that he had signed a contract with Silvercorp USA, a private security firm founded by Goudreau.

The Iraq and Afghanistan veteran admitted the existence of the operation in a video and claimed Silvercorp was contracted by Venezuela's opposition.

In the video, Goudreau showed what he claimed was a contract signed by Guaido, whose press team denied the allegation.

He also told The Washington Post that he hired Denman and Berry as "supervisors" and had known them for years.

Rendon told CNN the contract was "exploratory" and that no green light was given to an operation in Venezuela. He also denied Guaido was involved.

Despite the Venezuela regime's accusations against Guaido, he has not been charged with anything.