After 18 years, the end of the Afghan War and bringing all American troops home from Afghanistan is finally in sight with the signing of a historic agreement between the United States and the Taliban on Saturday.

President Donald Trump hailed the agreement Saturday in the White House briefing room, congratulating all those who have worked to bring the war to a conclusion.

“We’ve had tremendous success in Afghanistan in the killing of terrorists, but it’s time, after all these years, to go and to bring our people back home. We want to bring our people back home,” he said.

He recognized Americans who have lost their lives in the war — nearly 2,500 — and their families, and the more than 20,000 Americans wounded.

“Most of all, I want to thank all of the people in the United States for having spent so much, in terms of blood, in terms of treasure and treasury — the money that has been spent, the lives that have been lost,” he said.

The agreement signed on Saturday commits the U.S. to drawing down its troop presence in Afghanistan from about 12,000 now to 8,600 within 135 days, or about four-and-a-half months beginning immediately.

In return, the Taliban commits to preventing terrorists from using Afghan soil to plan attacks against the United States, as was done by al-Qaeda with the September 11, 2001, attacks on New York City.

After the signing, the Taliban committed to beginning talks with Afghan national leaders on a “permanent and comprehensive ceasefire,” and conducting a prisoner exchange.

Depending on the success of those intra-Afghan talks, the U.S. and NATO will continue drawing down its forces, as well as non-diplomatic personnel such as private security contractors, trainers, advisers, and those supporting the military presence within 14 months, or nine-and-a-half months after the initial drawdown.

Also depending on the success of those intra-Afghan talks, the U.S. will review its sanctions list against Taliban members with a goal of removing them by August 27, 2020, and will begin an effort to remove them from the United Nations’ sanctions list by May 29, 2020.

Trump said he would personally meet with Taliban leaders in the “not-too-distant future.”

“It’s been a long journey in Afghanistan in particular. It’s been a very long journey. It’s been a hard journey for everybody,” he said.

He warned, however, that if “bad things happen,” the U.S. would “go back.”

“I really believe the Taliban wants to do something to show that we’re not all wasting time. If bad things happen, we’ll go back. I let the people know: We’ll go back and we’ll go back so fast, and we’ll go back with a force like nobody has ever seen. And I don’t think that will be necessary. I hope it’s not necessary,” he said.

Trump campaigned on ending the wars in Syria and Afghanistan and bringing U.S. troops home.

The U.S. has spent more than $750 billion on the war — more than $40 billion per year over 18 years — according to the Associated Press.

There is a mixture of optimism and skepticism in Washington over the agreement.

Republicans who have called for a more restrained U.S. foreign policy hailed the agreement.

“It is long last time to bring our troops home and stop the endless wars. I’m pleased to see this progress and am thankful to @realDonaldTrump for his willingness to put America first and work to finally get our troops out of Afghanistan,” said Sen. Rand Paul (R-KY):

It is long last time to bring our troops home and stop the endless wars. I’m pleased to see this progress and am thankful to @realDonaldTrump for his willingness to put America first and work to finally get our troops out of Afghanistan. https://t.co/nTJCouyk8h — Senator Rand Paul (@RandPaul) February 29, 2020

Rep. Matt Gaetz (R-FL), another top Republican voice calling for restraint and congressman to the district with the highest concentration of military veterans, said, “President @realDonaldTrump has functionally ended our involvement in the Syrian Civil War. Bringing our bravest patriots home from Afghanistan will continue to deliver on an #AmericaFirst foreign policy.”

President @realDonaldTrump has functionally ended our involvement in the Syrian Civil War. Bringing our bravest patriots home from Afghanistan will continue to deliver on an #AmericaFirst foreign policy. — Matt Gaetz (@mattgaetz) February 29, 2020

Other Republicans in Congress expressed cautious support, calling the agreement a positive step, but cautioned that the Taliban must prove their commitment to the agreement.

After nearly 20 years in Afghanistan, this administration is working toward closing this chapter. Today’s announcement is a positive step, but the Taliban must prove to the world they are ready for peace. https://t.co/tTLDGnVYGr — Kevin McCarthy (@GOPLeader) February 29, 2020

Democrats also expressed cautious support for the agreement.

House Armed Services Committee Chairman Adam Smith (D-WA) called the agreement “an encouraging first step towards ending U.S. military involvement in Afghanistan in the most responsible way possible.”

“Afghans and Americans alike are ready to see an end to the violence,” he said.

While he said there is “still much work to be done,” he added, “As a country, we have invested far too much – in blood and treasure – to risk letting this opportunity pass us by.”

National security hawks slammed the agreement, including several former Trump administration officials.

Former Trump National Security Adviser John Bolton called the agreement an “unacceptable risk to America’s civilian population” and an “Obama-style deal”:

Signing this agreement with Taliban is an unacceptable risk to America's civilian population. This is an Obama-style deal. Legitimizing Taliban sends the wrong signal to ISIS and al Qaeda terrorists, and to America's enemies generally. — John Bolton (@AmbJohnBolton) February 29, 2020

Establishment foreign policy figures such as former Bush administration official and Council of Foreign Relations President Richard Haass also criticized the agreement. “As welcome as peace in Afghanistan would be, it is hard to believe it is at hand,” he said:

As welcome as peace in Afghanistan would be, it is hard to believe it is at hand. I see no mention of Taliban disarmament or closing its Pakistan sanctuary. The risk is the US removes capabilities in the long-shot hope the Taliban will change its ways. https://t.co/VyQxXtRAXl — Richard N. Haass (@RichardHaass) February 29, 2020

But despite the skepticism, even the Senate’s leading hawk Rep. Lindsey Graham (R-SC) said it was “time to try.”

“I am very suspect of the Taliban ever accepting the Afghan constitution and honoring the rights of religious minorities and women. Time will tell if reconciliation in Afghanistan can be accomplished with honor and security, but after more than 18 years of war, it is time to try,” he said in a statement.

Follow Breitbart News’ Kristina Wong on Twitter or on Facebook.