Secretary-General António Guterres opened the 74th United Nations General Assembly on Tuesday with a "state of the world" speech that painted a grim picture of a deeply divided and anxious planet facing an assortment of challenges that could only be confronted by collaboration.

U.S. President Donald Trump followed an hour later with a speech promoting a muscular brand of unilateralism, pledging to only engage in international alliances if American interests aren't compromised.

"If you want freedom, take pride in your country," said Trump. "If you want democracy, hold on to your sovereignty. And if you want peace, hold on to your nation."

"The future does not belong to globalists, the future belongs to patriots," he said.

The event on Tuesday unfolded against the backdrop of flaring tensions between Iran and Saudi Arabia, backed by its longtime supporter, the United States. The Saudis say Iran was responsible for an attack earlier this month on two oil facilities, which Iran denies.

The U.S. has imposed increasingly crippling sanctions on Tehran, which Trump said would only be tightened if the "menacing behaviour" of Iran continued.

"The regime's record of death and destruction is known to us all," he said, accusing them of "fuelling the tragic wars in both Syria and Yemen."

Iranian President Hassan Rouhani, who is in New York, is scheduled to address world leaders on Wednesday.

Delegate from <a href="https://twitter.com/hashtag/Venezuela?src=hash&ref_src=twsrc%5Etfw">#Venezuela</a> reads a book as Donald Trump castigates gov’t of Nicolas <a href="https://twitter.com/hashtag/Maduro?src=hash&ref_src=twsrc%5Etfw">#Maduro</a> during his national address to leaders <a href="https://twitter.com/UN?ref_src=twsrc%5Etfw">@UN</a> General Assembly <a href="https://t.co/e266cb8muw">pic.twitter.com/e266cb8muw</a> —@KentUNCBC

Elsewhere, Trump hit predictable notes – promising a vigorous defence of Israel's interests, accusing China of breaching accepted international trade rules, directing broadsides against Venezuela's regime and stressing that the U.S. will demand other countries increase their military expenditures.

The U.S. will also not participate in global aid initiatives which enable women in other countries to pursue an abortion, he re-emphasized.

In contrast to his appearance last year, in which he appeared taken aback when some of his boasts were greeted with laughter, Trump mostly plowed ahead with a 35-minute speech with no interruptions or asides.

'Diversity is not a threat'

For his part, Guterres cited the climate crisis, "the alarming possibility" of a Gulf conflict, the spread of terrorism and rising inequality as concerns.

He lamented the expansion of surveillance technology and systems to keep civilians controlled, discrimination and exploitation of migrants and women and girls, and the targeting of human rights advocates, environmentalists and journalists to stifle speech and protest.

"Diversity is not a threat, but a richness," the secretary general said.

UN Secretary General António Guterres opened the 74th session of the United Nations General Assembly on Tuesday with a plea to world leaders to embrace diversity. (Richard Drew/The Associated Press)

But Trump accused media organizations — without offering specifics — of "flatout assaults on our histories, traditions and values," and with respect to migration, the U.S president painted a world of host countries that squander human capital.

Receiving countries were being "overburdened" by the number of migrants," he said.

Accusing them of a "false sense of virtue," Trump charged that activists for migrants and and non-government organizations were abetting human smuggling and the "erasure" of borders.

"Your policies are not just. Your policies are cruel and evil," he said.

Trump asserted that the U.S. sought to "invest in the bright future of their own nations," but his administration has been criticized for proposing massive cuts in aid to the Northern Triangle in Central America — the source of the majority of asylum seekers — and threatening to withhold aid in exchange for safe third-country agreements with Guatemala and Mexico that are meeting with legal challenges.

Guterres's speech was sobering but the secretary-general pointed to the example shown by the world's youth the past week in climate change speeches and protests as a cause for optimism, and said people still believe in "the spirit and ideas" of the United Nations.

"We must do everything possible to avert the great fracture and maintain a universal system, a universal economy with universal respect for international law; a multipolar world with strong multilateral institutions," he told presidents, prime ministers, monarchs and ministers from the UN's 193 member states.

"We the leaders must deliver for we the peoples," he added.

Trump, a climate change skeptic, did not mention the environment in his speech, and his overall prescription was wholly different than Guterres's.

"When our nations are greater, our future will be brighter, our people will be happier and our partnerships will be stronger," said Trump.

'The Amazon is not being devastated'

Brazil's President Jair Bolsonaro, who preceded Trump, hit back at what he characterized as "sensational" and "colonialist" allegations from Western countries over the recent spread of wildfires in Brazil's Amazon, stating that the dry weather was the primary cause.

"The Amazon is not being devastated or consumed by fire," he said, declaring Brazil had "solemnly committed itself to environmental protection."

Both Trump and Brazil's President Jair Bolsonaro characterized socialism as a scourge, pointing to the example of Venezuela and its autocrat Nicolas Maduro. (Lucas Jackson/Reuters)

Bolsonaro said his administration was getting the country back on a proper economic footing after years of corruption and mismanagement by its political rivals, seeking to privatize some state-owned companies and welcoming the liberalization of trade, pointing to the Mercosur-European Union trade deal.

He said Brazil championed human rights and freedom of expression, though critics have accused his administration of employing a heavy-handed response to crime and attempting to control education curriculum by ensuring references to gender ideology and sexual orientation are scrubbed.

Elsewhere, Bolsonaro expounded on what he called the "cruelty of socialism," pointing to the collapse of the Venezuelan economy. Bolsonaro said Brazil was doing its part in integrating many of the millions of Venezuelan refugees who've fled for other South American countries.

Trump in his speech went even further, calling Venezuela's leader Nicolas Maduro a "Cuban puppet" and stating that the U.S. welcomed the day "when Venezuela will be free and when liberty will prevail throughout this hemisphere."

A Venezuelan delegate appeared to protest his comments by holding a hardback book in front of her face as Trump accused the Venezuelan government of abuses.

The book was about Simon Bolivar, a Venezuelan soldier and statesman who led the revolutions against Spanish rule.

'Thousands of Baby Alans'

Turkish President Recep Tayyip Erdogan told the audience the ongoing war in Syria was being forgotten, and held up the now-famous photograph of three-year-old Alan Kurdi, the refugee with Canadian family whose body washed up on a Turkish beach in 2015.

"There are thousands of Baby Alans," said Erdogan.

Ankara has taken in an estimated 3.6 million refugees from Syria during the nine-year war, seeing over a half-million children born in Turkey to Syrian parents.

Turkey's president says Syria's war is being forgotten 1:08

"We have been left to the refugees alone," said Erdogan.

Turkey is seeking to repatriate many of the refugees as soon as possible, but critics argue despite the Bashar al-Assad government increasingly re-asserting control in the country with the military aid of Russia, conditions are far from safe for Syrians to return.

He also used his speech to remind the world about the killing of Washington Post columnist Jamal Khashoggi by Saudi agents in Istanbul last year.

World leaders from 136 nations are attending the assembly. Saudi Arabian Crown Prince Mohammed bin Salman, Mexican President Andres Manuel Lopez Obrador and Israeli Prime Minister Benjamin Netanyahu are among those sending ministers in their absence.