Story highlights

Donald Trump told CNN on Tuesday that going into Afghanistan was not a mistake

That statement contradicts comments he made two weeks ago

Washington (CNN)Donald Trump said Tuesday the U.S. was right to invade Afghanistan after the Sept. 11, 2001, terrorist attacks -- a reversal of his position earlier this month when he called the war a "mistake."

"We made a mistake going into Iraq. I've never said we made a mistake going into Afghanistan," Trump told CNN's Alisyn Camerota on "New Day," when pressed about his comments earlier this month.

Trump told CNN's "New Day" on October 6 that he believed entering Afghanistan was a mistake and worried about U.S. forces getting stuck there.

"At some point, are they going to be there for the next 200 years? At some point what's going on? It's going to be a long time," Trump said, when asked about Afghanistan. "We made a terrible mistake getting involved there in the first place. We had real brilliant thinkers that didn't know what the hell they were doing. And it's a mess. It's a mess. And at this point, you probably have to (stay) because that thing will collapse about two seconds after they leave. Just as I said that Iraq was going to collapse after we leave."

But when pressed on that answer Tuesday, Trump denied that he had characterized U.S. entry into Afghanistan as a mistake and said he had only talked about Iraq.

"I never said that. OK, wouldn't matter, I never said it. Afghanistan is a different kettle. Afghanistan is next to Pakistan, it's an entry in. You have to be careful with the nuclear weapons. It's all about the nuclear weapons. By the way, without the nukes, it's a whole different ballgame," Trump said.

Trump has long bashed the Iraq War, saying again Tuesday that the decision to go there destabilized the Middle East and created an opening for Iran. But he said Tuesday that the Afghanistan War was necessary and said he supported keeping a limited number of troops there.

"Do I love anything about it? No. I think it's important, number one, that we keep a presence there and ideally a presence of pretty much what they're talking about -- 5,000 soldiers," Trump said Tuesday.

Trump first appeared to signal his backtrack at a rally in South Carolina when he said Afghanistan is "where we should have gone," meaning the U.S. should have focused its attention on Afghanistan over Iraq.

President Barack Obama announced last week that he would maintain troop levels -- about 9,800 servicemen and women -- in Afghanistan through much of 2016, delaying again a long-planned pullout from the country.