U.S. President Donald Trump on Wednesday told NATO allies to commit to spending 4 percent of their economic output on defense, up from the current goal of 2 percent.

Trump made the suggestion on the first day of a two-day summit of the North Atlantic Treaty Organization in Brussels, a senior U.S. administration official said.

The U.S. president has been pressing other NATO members to increase their defense outlays, accusing them of freeloading at the expense of the United States.

NATO leaders reiterated their "unwavering commitment" to boost defense spending in a declaration they signed on Wednesday.

Later, however, Trump insisted via Twitter that NATO allies meet their commitment of 2 percent of their gross domestic product on defense spending immediately.

"What good is NATO if Germany is paying Russia billions of dollars for gas and energy? Why are there only 5 out of 29 countries that have met their commitment? The U.S. is paying for Europe's protection, then loses billions on Trade. Must pay 2% of GDP IMMEDIATELY, not by 2025," Trump wrote.

In 2014, NATO members agreed to move toward spending 2 percent of their GDP on defense by 2024.