U.S. President Donald Trump is "pleased" with pledges by NATO allies to spend more on defense, but he would consider withdrawing if they don't honor those pledges, a senior White House official said.

"He's at a place now, he would like to stay in NATO...The president is pleased with what he's seeing," the official told foreign reporters on May 17. "But he also is not going to stay in NATO if NATO doesn't make a lot more progress much quicker."

Last month, Trump said the alliance was "no longer obsolete" after having frequently criticized NATO allies on the campaign trail for not paying their fair share or doing more to fight global terrorism.

NATO's top commanders earlier on May 17 appeared to answer one Trump concern by recommending that the alliance join the coalition fighting the Islamic State group in Syria and Iraq. All of NATO's individual members currently are in the coalition.

Trump will meet with other NATO leaders in Brussels on May 25 and is expected to keep up pressure on allies to bolster their defense spending. NATO members have committed to spend 2 percent of gross domestic product on defense, but most are far short of that goal.