US servicemen Afghanistan
© Justin Sullivan/Getty
Before he was elected president, Donald Trump frequently expressed frustration with America's longest war.

"Do not allow our very stupid leaders to sign a deal that keeps us in Afghanistan through 2024 - with all costs by U.S.A.," Trump wrote on Twitter in November 2013. "MAKE AMERICA GREAT!"

Trump shared his frank assessment about the Afghanistan conflict many times in 2013, as the United States military was repeatedly hit by terrorist attacks in the region.

"Let's get out of Afghanistan. Our troops are being killed by the Afghanis we train and we waste billions there," he wrote. "Nonsense! Rebuild the USA."

The mission in Afghanistan took a political blow as well in 2013, as President Hamid Karzai challenged the Obama administration's security pact.

"We have wasted an enormous amount of blood and treasure in Afghanistan. Their government has zero appreciation. Let's get out!" Trump said after Karzai's bluster. "Can you believe that "President" Karzai of Afghanistan is holding out for more, more, more and refuses to sign deal. Tell him to go to hell!"

Earlier in 2013, Trump signaled agreement with then-President Barack Obama's desire to get out of the country.

"I agree with Pres. Obama on Afghanistan," after Obama and Karzai agreed to speed up the process of American troops leaving the country. "We should have a speedy withdrawal. Why should we keep wasting our money - rebuild the U.S.!"

"We should leave Afghanistan immediately. No more wasted lives," he wrote. "If we have to go back in, we go in hard & quick. Rebuild the US first."

In 2015, Trump ridiculed Obama for setting a date for the departure of U.S. troops, allowing the Taliban to wait out the war.

"As soon as we left, they knocked the shit out of everybody!" Trump said during a speech in New Hampshire precluding his run for president.

At that time, Trump said the United States should be "unpredictable" in the fight in Afghanistan.

"I would never have given a date ... I would have said, 'No, we're never leaving!" he said, predicting that the terrorists would give up if faced with American resolve.

As the election drew closer, Trump told voters that he would do things differently from previous presidents.

"For years, we have been caught up in endless wars and conflicts under the leadership of failed politicians and a failed foreign policy establishment in Washington D.C.," he said during a rally in North Carolina in 2016. "The same people who made every wrong decision in Iraq, Afghanistan, Libya, Syria, Egypt, China and Russia are the same people who are advising Hillary Clinton."

Trump told voters that he would listen to the generals, instead of the foreign policy establishment.

"I am proud instead to have the support of our warfighting generals, active duty military officers, and top military experts who know how to win - and know how to keep us out of endless war," he said.