(CNN) -- Despite loudly-voiced objections to its relevancy and its funding, US President Donald Trump has committed to attend a meeting of NATO leaders in Europe in May, according to the organization.

Trump, who was outspoken on the campaign trail about the role -- and upkeep -- of the security pact, spoke with NATO Secretary General Jens Stoltenberg Sunday night.

Advertisement

During the call, the two leaders "reconfirmed the importance of the Alliance in troubled times," according to a statement from NATO.

Trump and Stoltenberg specifically discussed NATO allies meeting their defense spending commitments, the role of the organization in defeating terror, and the potential for a peaceful resolution to the Ukrainian conflict.

"The Secretary General recalled NATO's consistent policy of strong defense and dialogue with Russia," the statement reads. "The Secretary General and President Trump looked forward to the upcoming NATO summit in Brussels in late May to discuss these issues."

The White House confirmed that Trump would attend the summit.

U-turn

Last month, in a joint interview with the Times of London and the German publication Bild, Trump accused the organization, which was founded in 1949 as a bulwark against Soviet expansionism, of being "obsolete."

In the interview, which took place prior to his inauguration, Trump restated his campaign-trail doubts about the transatlantic alliance.

"I said a long time ago that NATO had problems," he said.

"Number one, it was obsolete, because it was designed many, many years ago.

"Number two, the countries weren't paying what they're supposed to be paying," adding that this was unfair to the United States.

Only five of NATO's 28 members -- the US, Greece, Poland, Estonia and the UK -- meet the alliance's target of spending at least 2% of GDP on defense.

The comments led to "astonishment and agitation" within the alliance, German Foreign Minister Frank-Walter Steinmeier said.

However, Trump's Defense Secretary, James Mattis, later sent a strong signal of support to NATO later in January, reaching out to three critical alliance partners and saying the US had an "'unshakeable commitment to NATO."

At a press briefing following the calls, White House press secretary Sean Spicer was asked about the disconnect between Mattis' comments and his boss'.

"The President is very clear that as it's structured now, in terms of the output of NATO, he doesn't feel as though it's doing what its mission was set up to do or that it's being particularly effective," Spicer said at the time.

European leaders denounce Trump statements

Sunday's call came after EU leaders met in Malta last week, where they denounced the incoming President's recent attacks on Europe as they met for a summit to debate the future of the union.

EU leaders have been rattled by Trump's comments on Europe and the NATO transatlantic alliance. Along with calling the alliance "obselete," he has voiced his support for Britain's departure from the EU and criticized European refugee policies.

French President Francois Hollande hit out at Trump as Hollande arrived at the informal summit on the future of the EU in Malta.

"There are threats, there are challenges," he said. "What is at stake is the very future of the European Union."