John McCain (R-Ariz.), Joseph I. Lieberman (I-Conn.) and Lindsey Graham (R-S.C.) are members of the Senate Armed Services Committee.

A series of tragic events in Afghanistan has increased the desire of a war-weary public to end our mission there. As heart-wrenching as these events have been, they do not change the vital U.S. national security interests at stake in Afghanistan, nor do they mean that the war is lost. It is not. There is still a realistic path to success if the right decisions are made in the coming months.

The painful lesson we learned on Sept. 11, 2001, remains true today: What happens in Afghanistan directly affects our safety here at home. We abandoned Afghanistan in the 1990s, and the result was a fanatical regime that allowed its territory to become a base for global terror attacks, while inflicting medieval tyranny on the Afghan people, especially women. If we quit Afghanistan again, and abandon the millions of Afghans who have risked everything to be our allies in the hopes of succeeding together, the consequences will be disastrous for both our peoples.

It does not have to be this way. Significant military progress has been made in Afghanistan — progress that we have personally witnessed over repeated visits. Four years ago, southern Afghanistan was overrun by the Taliban, and our coalition lacked the resources and the strategy necessary to break their momentum. Today, that situation has been reversed, thanks to the president’s surge of forces, the leadership of talented military commanders, and the courage and perseverance of our troops.

Similarly, our effort to build the Afghan National Security Forces — which was under-resourced and disorganized four years ago — has been overhauled. Growing numbers of Afghan units are increasingly capable of leading the fight. The examples of the few Afghan soldiers who despicably turned their weapons on Americans should not obscure the fact that hundreds of thousands of Afghans fight every day as our faithful allies in a common battle against al-Qaeda and the Taliban and that these Afghan patriots are wounded and killed in far greater numbers than our forces. Afghans bear an overwhelming and increasing share of this war. This should give us hope that our common goal, an Afghanistan that can secure and govern itself, remains achievable over time.

To sustain this fragile progress, it is critical that President Obama resist the shortsighted calls for additional troop reductions, which would guarantee failure. Our forces are slated to draw down to 68,000 by September — a faster pace than our military commanders recommended, which has significantly increased the risks for our mission. At a minimum, there should be a pause after September to assess the impact of the drawdown. It would be much better to maintain the 68,000 forces through next year’s fighting season, possibly longer.

At the strategic level, our effort continues to be undermined by the perception that the United States will again abandon Afghanistan. This suspicion makes everything our troops are trying to achieve significantly harder. It creates perverse incentives for the Taliban to keep fighting, for the Pakistani army to hedge its bets by providing support to the Taliban, and for our Afghan allies to make counterproductive decisions based on fears of a post-American future.

The best way to reverse this dynamic is by realizing the president’s stated goal of a long-term political, economic and military relationship with Afghanistan. The mechanism for doing so is the Strategic Partnership Agreement, which the U.S. and Afghan governments have painstakingly negotiated for two years.

Two weeks ago, one of the two major obstacles was resolved when our governments agreed on a timetable for handing over detention operations. We are optimistic that a similar resolution can be found soon regarding the gradual transfer of the lead for “night raids” to Afghan forces. Already, Afghans increasingly lead these operations. The success rate is overwhelming, and in most cases no shots are fired.

With these two issues resolved, we could finally conclude the Strategic Partnership Agreement. This could provide a framework for an enduring U.S. military commitment to Afghanistan beyond 2014, including joint operating facilities and long-term support for the 350,000-plus Afghan National Security Forces necessary to secure the country. It would also encourage our allies to make similar long-term commitments.

A key part of this post-2014 U.S. military commitment should be a counterterrorism force that can continue working with our Afghan partners against al-Qaeda and the Taliban, ensuring that these groups can no longer pose a military threat to Afghanistan, our allies and us. This force could be a fraction of our current military presence in Afghanistan and still be serious and robust, consisting of U.S. air power, intelligence support for the Afghans and Special Operations Forces. It would, in effect, be an insurance policy against a terrorist takeover of Afghanistan, the place where the Sept. 11 attacks were planned.

Making these commitments will set the conditions under which our forces can responsibly draw down and hand the lead to the Afghans. The strategic partnership will make clear to the Taliban that it cannot wait us out and win on the battlefield, thus fostering real reconciliation on terms favorable to the Afghan government and to us. It will demonstrate to Pakistani intelligence that continued support for the Taliban, on the assumption its members will be needed as proxies once we leave, will only leave Islamabad more isolated and less secure. And it will give Afghan leaders the reassurance to fight corruption and govern better, knowing that they have a long-term alternative to Pakistani generals, Iranian operatives, foreign terrorists and Afghan warlords. In short, this agreement could change the narrative in Afghanistan and the region from one of imminent international abandonment to enduring international commitment.

These decisions rest, more than anyone else, with President Obama. We have disagreed with some of his choices regarding the war in Afghanistan. But after all our nation has sacrificed in Afghanistan, we stand ready to do everything in our power to secure the same bipartisan support for this war in its twilight hours as when it began more than a decade ago.