BRUSSELS — European Union leaders on Thursday committed to working together to bolster the continent’s defenses and to free up hundreds of billions of euros for security after U.S. President Donald Trump’s repeated warnings that he would cut them adrift to face the threat of Russia alone.

With the growing conviction that they will now have to fend for themselves, countries that have faltered on defense spending for decades held emergency talks in Brussels to explore new ways to beef up their security and ensure future protection for Ukraine.

“Today history is being written,” European Commission President Ursula von der Leyen said.

She said the 27 EU leaders are “determined to ensure Europe’s security and to act with the scale, the speed and the resolve that this situation demands. We are determined to invest more”

The pledge underscored a sea change in geopolitics spurred on by Trump, who has undermined 80 years of cooperation based on the understanding that the U.S. would help protect European nations.

— The Associated Press