Donald Trump warned the future of the West is in peril in speech in Poland ahead of a G20 meeting.

The warning, revealed by US officials, comes amid increasing tensions over North Korea and in the Gulf.

Mr Trump warned that the "fundamental question of our time is whether the West has the will to survive".

Thousands march against Donald Trump in LGBT rights parade Show all 8 1 /8 Thousands march against Donald Trump in LGBT rights parade Thousands march against Donald Trump in LGBT rights parade A marcher hold a sign that reads "Love is Love is Love" on the National Mall with the Washington Monument in the background during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers unfurl a huge rainbow flag as they prepare to march in the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers gather to hear speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade Gil Mendez, of San Francisco, holds a sign to honor the victims of the shooting at the Pulse Nightclub in Orlando as he marches during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade An demonstrator looks on as LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher listens to speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher mugs for the camera during the Los Angeles LGBTQ #ResistMarch AP

Mr Trump addressed crowds in Warsaw and is expected to focus on the importance of Poland and security concerns facing the world. He will also discussed the US relationship with the EU, officials said.

"This continent no longer confronts the specter of communism. But today we’re in the West, and we have to say there are dire threats to our security and to our way of life," he said. "You see what’s happening out there. They are threats. We will confront them. We will win. But they are threats.

"We must work together to confront forces, whether they come from inside or out, from the South or the East, that threaten over time to undermine these values and to erase the bonds of culture, faith and tradition that make us who we are. If left unchecked, these forces will undermine our courage, sap our spirit, and weaken our will to defend ourselves and our societies."

Saying that people should be inspired by the spirit of the Warsaw uprising, Mr Trump said that "our freedom, our civilization, and our survival depend on these bonds of history, culture, and memory."

Trump is delivering the speech from Krasinski Square, the site of a monument commemorating the 1944 Warsaw Uprising against Nazi occupation. Polish media reports said the government, as part of its invitation to Trump, promised the White House a reception of cheering crowds. Plans call for ruling party lawmakers and pro-government activists to bus in groups of people from outlying provinces for the speech.

The White House did not respond to requests for comment on those reports. Scores of people lined darkened streets late Wednesday after Trump arrived to watch as the motorcade sped him and his wife, Melania, to their hotel.