UNITED NATIONS -- Embattled Venezuelan President Nicolas Maduro showed up unexpectedly at the U.N. General Assembly on Wednesday to "defend his country" as six nations accused him of crimes against humanity and President Donald Trump hinted at taking military action. The surprise visit came after Maduro threatened to skip the global gathering, citing fears he could be assassinated as his once-wealthy OPEC nation spirals into a brutal economic crisis and international pressure mounts for the socialist leader to step down.

In a rambling, 50-minute General Assembly speech directed mostly at U.S. policy, Maduro spoke for well over the allotted time and said that the United States "wants to continue giving orders to the world as though the world were its own property."

"From this very rostrum a threat was issued yesterday to governments of the world that orders should be obeyed and the U.S. policy should be followed or else those countries would suffer from the consequences," Maduro said.

Get Breaking News Delivered to Your Inbox

He was referring to Trump's speech Tuesday in which the U.S. president outlined the rationale for his more unilateral "America-first" policy.

It appeared unlikely that Maduro would cross paths with Trump, despite the U.S. president's comments earlier in the day that he was willing to meet with his Venezuelan counterpart if it would help ease suffering in the South American nation.

"I'm willing to meet with anybody anytime I can (to) save lives, help people," Trump said as he was pummeled by reporters' questions about whether the U.S. would ever intervene militarily to remove Maduro.

Maduro responded to the comments in kind, saying that he and Trump "certainly have our differences, but that is what we have to dialogue about."

"Donald Trump said he was worried about Venezuela, he wanted to help Venezuela," Maduro said. "Good. I stand ready to talk with an open agenda on everything that he might wish to talk about with the United States of America."

On Wednesday, presidents from five conservative Latin American governments and Canada's prime minister met in New York and signed a complaint with the International Criminal Court, asking it to investigate Maduro on charges of crimes against humanity.

It's the first time that member countries have referred another country to the Netherlands-based U.N. court. They pointed to a human rights report accusing Venezuelan security forces of carrying out arbitrary arrests, murders, extrajudicial executions, torture, sexual abuse and rape on orders from Maduro's government.

"To remain indifferent or speculative in front of this reality could be perceived as being complicit with the regime," said Paraguayan Foreign Minister Andres Rodriguez Pedotti. "We are not going to be complicit."

Venezuela's ousted chief prosecutor, Luisa Ortega, meanwhile, called on the United States to take advantage of Maduro's visit to arrest him on charges of organized crime, corruption and genocide. A small group of Venezuelans shouted "Assassin!" as they protested his presence outside the U.N.

Maduro's trip came a day after the Trump administration imposed financial sanctions on four members of his inner circle, including his wife and Venezuela's vice president, on allegations of corruption. Trump also suggested Maduro could be easily toppled in a military coup, echoing comments first floated last year that some sort of "military solution" might be needed to restore Venezuela's democracy.

"These are illegal unilateral sanctions imposed on us," Maduro said in his speech, reflecting previous comments about earlier sanctions.

Upon arrival, Maduro held meetings with Iranian President Hassan Rohani and Russian Foreign Minister Sergey Lavrov - both of whose countries, like Venezuela, are under U.S. financial sanctions.

Addressing the U.S. threats, Lavrov said afterward that "we are ready to offer all-around assistance for all of your plans," Russian news agencies reported.

Maduro has been seeking a meeting with Trump for almost two years and has watched with frustration as the U.S. leader has talked with American adversaries like North Korea's Kim Jong Un and Russia's Vladimir Putin while shunning Venezuelan entreaties.

Citgo, a subsidiary of Venezuela's state-owned oil company, was a major corporate donor to Trump's inaugural committee. Maduro also this year freed a former Utah missionary jailed for more than two years on weapons charges in a bid to improve relations with the White House.

His desire for some sort of reconciliation with the U.S. has increased as international pressure has been building on his socialist government at a time of hyperinflation and widespread food and medicine shortages.

An estimated 2.3 million Venezuelans have fled into neighboring countries in the last four years, threatening to upset regional stability.

Maduro had not attended the U.N. General Assembly since 2015.