German Chancellor Angela Merkel and US President Donald Trump at a joint press conference in Washington. Chip Somodevilla/Getty Images President Donald Trump says he referred to NATO as "obsolete" during his presidential campaign because he didn't know "much" about the organization at the time since he was new to politics.

Trump recalled in an interview with the Associated Press on Friday that when he was first asked about the North Atlantic Treaty Organization by CNN's Wolf Blitzer, he was caught off guard because he "wasn't in government" so never had to learn about the US-led defense alliance.

"People don't go around asking about NATO if I'm building a building in Manhattan, right?" Trump said, according to the AP's transcript.

"So they asked me, Wolf ... asked me about NATO, and I said two things. NATO's obsolete — not knowing much about NATO, now I know a lot about NATO — NATO is obsolete, and I said, 'And the reason it's obsolete is because of the fact they don't focus on terrorism.' You know, back when they did NATO there was no such thing as terrorism."

Trump reiterated that NATO was "obsolete" in January, in an interview conducted with the Times of London and Bild newspapers published just three days before he took office. That interview prompted an immediate reaction from German Chancellor Angela Merkel, who told reporters in Berlin that Europeans had "our destiny in our own hands."

"I will continue to work to ensure that the 27 member states work together effectively and, above all, in a forward-looking way," she said, adding that Trump's positions had "been known for a while."

Trump with NATO Secretary-General Jens Stoltenberg during a news conference in the East Room of the White House on April 12 in Washington. Evan Vucci/AP

In a joint press conference with NATO Secretary-General Jens Stoltenberg earlier this month, however, Trump appeared to reverse his position, referring to his earlier comments and telling reporters that NATO "is not obsolete." He added that he and Stoltenberg had a "productive discussion about what more NATO can do in the fight against terrorism."

"I complained about that a long time ago, and they made a change and now they do fight terrorism," Trump said.

The organization, however, did invoke its collective-defense clause in response to the September 11, 2001, terrorist attacks. NATO commanded the International Security Assistance Force in Afghanistan for over a decade, and it launched a new training program in February for Iraqi security forces to counter the Islamic State.

Trump reiterated in his interview with the AP that he thought it was "not fair" that the US was paying the agreed-upon amount on defense while other member nations were not.