Republican presidential hopefuls  Ben Carson and Donald Trump   participate in the Republican Presidential Debate at the Ronald Reagan Presidential Library in Simi Valley, California on September 16, 2015.
FREDERIC J. BROWN/AFP/AFP/Getty Images
Republican presidential hopefuls Ben Carson and Donald Trump participate in the Republican Presidential Debate at the Ronald Reagan Presidential Library in Simi Valley, California on September 16, 2015.
Now playing
02:09
Trump, Carson go head-to-head
Green Party presidential nominee Jill Stein waits to be introduced prior to a press conference at the National Press Club August 23, 2016 in Washington, DC.
Win McNamee/Getty Images
Green Party presidential nominee Jill Stein waits to be introduced prior to a press conference at the National Press Club August 23, 2016 in Washington, DC.
Now playing
01:44
Jill Stein raises millions for recount
Former Democratic US Presidential candidate Hillary Clinton speaks to staff and supporters at the New Yorker hotel after her defeat in the presidential election November 9, 2016 in New York. / AFP / Brendan Smialowski        (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)
BRENDAN SMIALOWSKI/AFP/Getty Images
Former Democratic US Presidential candidate Hillary Clinton speaks to staff and supporters at the New Yorker hotel after her defeat in the presidential election November 9, 2016 in New York. / AFP / Brendan Smialowski (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)
Now playing
02:14
Scientists urge Clinton to call for recount
LYNDEN, WA - MAY 07: Republican presidential candidate Donald Trump gives a speech during a rally at the The Northwest Washington Fair and Event Center on May 7, 2016 in Lynden, Washington. Trump became the Republican presumptive nominee following his landslide win in Indiana on Tuesday. (Photo by Matt Mills McKnight/Getty Images)
Matt Mills McKnight/Getty Images North America/Getty Images
LYNDEN, WA - MAY 07: Republican presidential candidate Donald Trump gives a speech during a rally at the The Northwest Washington Fair and Event Center on May 7, 2016 in Lynden, Washington. Trump became the Republican presumptive nominee following his landslide win in Indiana on Tuesday. (Photo by Matt Mills McKnight/Getty Images)
Now playing
03:25
Donald Trump's wild ride
Now playing
01:46
Trump's challenges in the Middle East
Now playing
02:47
Fact checking Trump on crimes by immigrants
Mark Makela/Getty Images/Lintao Zhang/Getty Images
Now playing
01:26
Trump vs. the tape on Obama and the protester
Now playing
01:28
Trump compares Clinton email probe to Watergate
Members of the Secret Service rush Republican presidential candidate Donald Trump off the stage at a campaign rally in Reno, Nev., on Saturday, Nov. 5, 2016. (AP Photo/John Locher)
John Locher/AP
Members of the Secret Service rush Republican presidential candidate Donald Trump off the stage at a campaign rally in Reno, Nev., on Saturday, Nov. 5, 2016. (AP Photo/John Locher)
Now playing
01:20
Donald Trump rushed off stage by Secret Service
AFP/Getty Images
Now playing
02:16
Trump reads letter from Patriot's coach at rally
US Republican presidential nominee Donald Trump speaks during rally at the Atkinson Country Club in Atkinson, New Hampshire on November 4, 2016.
Mandel Ngan/AFP/Getty Images
US Republican presidential nominee Donald Trump speaks during rally at the Atkinson Country Club in Atkinson, New Hampshire on November 4, 2016.
Now playing
01:56
Trump on US officials: 'What a group of losers'
donald trump nice and cool pensacola fl bts_00001523.jpg
donald trump nice and cool pensacola fl bts_00001523.jpg
Now playing
00:49
Trump's mantra in campaign's final week: Stay on point
donald trump nice to hillary clinton and democrats orig cm_00000000.jpg
donald trump nice to hillary clinton and democrats orig cm_00000000.jpg
Now playing
01:52
Audio of Trump praising the Clintons and Democrats
cuomo lewandowski hillary clinton email exchange newday_00002327.jpg
cuomo lewandowski hillary clinton email exchange newday_00002327.jpg
Now playing
01:28
Cuomo grills Lewandowski on Clinton email 'hypocrisy'
Now playing
01:49
Meet the other Hillary Clinton and Donald Trump

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

(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.”

RELATED: Donald Trump: Afghanistan war a ‘mistake,’ but troops need to stay

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.

RELATED: Obama’s decision explained

CNN’s Jeremy Diamond contributed to this report.