President Trump said Tuesday the U.S. military would not be hamstrung by “artificial timelines” in Afghanistan, an acknowledgment of the deteriorating security situation there by a leader who previously called for a withdrawal of the American military from the country.

“Our warriors in Afghanistan also have new rules of engagement,” Trump said in his State of the Union address. “Along with their heroic Afghan partners, our military is no longer undermined by artificial timelines, and we no longer tell our enemies our plans.”

Those remarks follow three separate attacks by the Taliban and ISIS in or near Kabul, the Afghan capital. More than 100 people, including Americans, died in those attacks, which targeted a luxury hotel, an area restricted to Afghan government workers, and an Afghan army outpost.

This is President Trump’s first State of the Union address—his address to a joint session of Congress last year was not a State of the Union because, traditionally, the president must be in office for a year giving an official State of the Union. During the speech last year, Trump didn’t mention Afghanistan. But in the time since then, he unveiled his Afghan strategy and, reluctantly, approved the deployment of additional U.S. troops to the country. There are now 14,000 of them there, with plans to send an additional 1,000.

Since 2002, Afghanistan has made appearances in each of the presidential speeches to Congress, corresponding to nearly every year the U.S. has been at war in the country. And while the rhetoric shifts, the story remains in some ways consistent—America keeps aiming to defeat the Taliban and help rebuild the country as one that won’t harbor terrorists, and it keeps coming up short while declaring progress. Obama went so far as to declare three years ago that “our combat mission in Afghanistan is over.” His successor’s remarks on Tuesday show that that was not exactly true.

Here’s how the previous two presidents have described the state of Afghanistan before Congress:

2002

Bush’s remarks on January 29 came just months after the September 11 attacks and the U.S. intervention in Afghanistan. He said:

In four short months, our nation has comforted the victims, begun to rebuild New York and the Pentagon, rallied a great coalition, captured, arrested, and rid the world of thousands of terrorists, destroyed Afghanistan’s terrorist training camps, saved a people from starvation, and freed a country from brutal oppression. ...

When I called our troops into action, I did so with complete confidence in their courage and skill. And tonight, thanks to them, we are winning the war on terror. ...

Our military has put the terror training camps of Afghanistan out of business, yet camps still exist in at least a dozen countries.

At the end of the year, about 9,700 U.S. troops were in the country, fighting the Taliban.

2003

The following year, on January 28, Bush listed U.S. accomplishments in Afghanistan:

In Afghanistan, we helped to liberate an oppressed people. And we will continue helping them secure their country, rebuild their society, and educate all their children, boys and girls.

The number of U.S. troops in the country increased to 13,100 at the end of that year. But by then the Bush administration was more focused on the war in Iraq, which it invaded in March of 2003.

2004

On January 30, delivering the final State of the Union of his first term in office, Bush spoke of U.S. determination in the face of threats.

The first to see our determination were the Taliban, who made Afghanistan the primary training base of al-Qaeda killers. As of this month, that country has a new constitution guaranteeing free elections and full participation by women. Businesses are opening. Health care centers are being established, and the boys and girls of Afghanistan are back in school. With the help from the new Afghan army, our coalition is leading aggressive raids against the surviving members of the Taliban and al Qaeda. The men and women of Afghanistan are building a nation that is free and proud and fighting terror, and America is honored to be their friend.

Later that year, Afghans voted in presidential elections that put Hamid Karzai in office.

2005

On February 2, Bush referred to this political development in Afghanistan:

As a new Congress gathers, all of us in the elected branches of government share a great privilege: We’ve been placed in office by the votes of the people we serve. And tonight that is a privilege we share with newly elected leaders of Afghanistan, the Palestinian Territories, Ukraine, and a free and sovereign Iraq.

He also noted that “an international force is helping provide security” in the country.

2006

The following year, as security deteriorated, the president declared America back “on the offensive.” In his State of the Union on January 31, Bush said:

We remain on the offensive in Afghanistan, where a fine president and a National Assembly are fighting terror while building the institutions of a new democracy. We're on the offensive in Iraq with a clear plan for victory.

By the end of that year, there were about 20,000 U.S. troops in Afghanistan.

2007

On January 23, Bush openly acknowledged the Taliban’s attempt at a comeback in his penultimate address to Congress.

In Afghanistan, Taliban and al-Qaeda fighters tried to regain power by regrouping and engaging Afghan and NATO forces.

We didn't drive al-Qaeda out of their safe haven in Afghanistan only to let them set up a new safe haven in a free Iraq.

In Afghanistan, NATO has taken the lead in turning back the Taliban and al-Qaeda offensive, the first time the Alliance has deployed forces outside the North Atlantic area.

The number of U.S. troops rose to 25,000 by the end of that year.

2008

Bush was reflective in his final State of the Union address on January 28, looking back on the campaign in Afghanistan and sounding some of the same hopeful themes he had in earlier addresses.

In Afghanistan, America, our 25 NATO allies, and 15 partner nations are helping the Afghan people defend their freedom and rebuild their country. Thanks to the courage of these military and civilian personnel, a nation that was once a safe haven for al-Qaeda is now a young democracy where boys and girls are going to school, new roads and hospitals are being built, and people are looking to the future with new hope. These successes must continue, so we're adding 3,200 marines to our forces in Afghanistan, where they will fight the terrorists and train the Afghan Army and police. Defeating the Taliban and Al Qaida is critical to our security, and I thank the Congress for supporting America's vital mission in Afghanistan.

2009

Obama, who had campaigned to end the war in Afghanistan, won the presidential election held that November. By the time he delivered his first address to a joint session of Congress, on February 24, he was all but ready to declare his predecessor’s Afghanistan strategy null. What was needed, he said, was a “new and comprehensive” one.

And with our friends and allies, we will forge a new and comprehensive strategy for Afghanistan and Pakistan to defeat Al Qaida and combat extremism, because I will not allow terrorists to plot against the American people from safe havens halfway around the world. We will not allow it.

Later that year, he ordered a surge of U.S. troops to Afghanistan. At one point, some 100,000 U.S. troops were in the country.

2010

In his address on January 27, Obama revealed his intent to start shifting the responsibility for the war effort to the Afghans themselves.

[I]n Afghanistan, we're increasing our troops and training Afghan security forces so they can begin to take the lead in July of 2011 and our troops can begin to come home. We will reward good governance, work to reduce corruption, and support the rights of all Afghans, men and women alike. We're joined by allies and partners who have increased their own commitments and who will come together tomorrow in London to reaffirm our common purpose. There will be difficult days ahead, but I am absolutely confident we will succeed.

2011

The next year on January 25, Obama warned of tough fighting ahead but said U.S. troops would begin to return home soon:  

We’ve also taken the fight to al-Qaeda and their allies abroad. In Afghanistan, our troops have taken Taliban strongholds and trained Afghan security forces. Our purpose is clear: By preventing the Taliban from reestablishing a stranglehold over the Afghan people, we will deny Al Qaida the safe haven that served as a launching pad for 9/11.

Thanks to our heroic troops and civilians, fewer Afghans are under the control of the insurgency. There will be tough fighting ahead, and the Afghan government will need to deliver better governance. But we are strengthening the capacity of the Afghan people and building an enduring partnership with them. This year, we will work with nearly 50 countries to begin a transition to an Afghan lead, and this July, we will begin to bring our troops home.

In May of that year, Navy SEALs killed Osama bin Laden, the al-Qaeda leader, in Pakistan.

2012

With that victory behind him, Obama continued to tout the drawdown of U.S. troops in Afghanistan in the last State of the Union of his first term.

For the first time in two decades, Usama bin Laden is not a threat to this country. Most of Al Qaida's top lieutenants have been defeated. The Taliban's momentum has been broken, and some troops in Afghanistan have begun to come home. …

From this position of strength, we've begun to wind down the war in Afghanistan. Ten thousand of our troops have come home. Twenty-three thousand more will leave by the end of this summer. This transition to Afghan lead will continue, and we will build an enduring partnership with Afghanistan so that it is never again a source of attacks against America.

2013

Then on February 12, Obama boldly proclaimed that by the end of the following year, “our war in Afghanistan will be over.” He said:

Tonight we stand united in saluting the troops and civilians who sacrifice every day to protect us. Because of them, we can say with confidence that America will complete its mission in Afghanistan and achieve our objective of defeating the core of al-Qaeda.

Already, we have brought home 33,000 of our brave service men and women. This spring, our forces will move into a support role, while Afghan security forces take the lead. Tonight I can announce that over the next year, another 34,000 American troops will come home from Afghanistan. This drawdown will continue, and by the end of next year, our war in Afghanistan will be over.

Beyond 2014, America's commitment to a unified and sovereign Afghanistan will endure, but the nature of our commitment will change. We're negotiating an agreement with the Afghan Government that focuses on two missions: training and equipping Afghan forces so that the country does not again slip into chaos and counterterrorism efforts that allow us to pursue the remnants of al-Qaeda and their affiliates.

The number of U.S. troops fell to 46,000 at the end of the year.

2014

As the drawdown continued, Obama continued to express confidence that the war was ending. On January 28, he said the U.S. mission would be over by the end of the year—a fulfillment of his campaign promise in 2008:

With Afghan forces now in the lead for their own security, our troops have moved to a support role. Together with our allies, we will complete our mission there by the end of this year, and America's longest war will finally be over.

After 2014, we will support a unified Afghanistan as it takes responsibility for its own future. If the Afghan Government signs a security agreement that we have negotiated, a small force of Americans could remain in Afghanistan with NATO allies to carry out two narrow missions: training and assisting Afghan forces and counterterrorism operations to pursue any remnants of Al Qaida. For while our relationship with Afghanistan will change, one thing will not: our resolve that terrorists do not launch attacks against our country. ...

And with the Afghan war ending, this needs to be the year Congress lifts the remaining restrictions on detainee transfers and we close the prison at Guantanamo Bay.

When the deadline came at the end of December, the U.S. still had about 13,000 troops in the country—back to about 2003 levels—there to train and advise Afghan forces.

2015

The president declared on January 20: “Tonight, for the first time since 9/11, our combat mission in Afghanistan is over.”

Six years ago, nearly 180,000 American troops served in Iraq and Afghanistan. Today, fewer than 15,000 remain. And we salute the courage and sacrifice of every man and woman in this 9/11 generation who has served to keep us safe. We are humbled and grateful for your service. …

Instead of Americans patrolling the valleys of Afghanistan, we've trained their security forces, who have now taken the lead, and we've honored our troops' sacrifice by supporting that country's first democratic transition. Instead of sending large ground forces overseas, we're partnering with nations from South Asia to North Africa to deny safe haven to terrorists who threaten America.

2016

The following year, on January 12, Obama, in his final State of the Union, acknowledged that even if some terrorists went away, new militants or other sources of instability could take their place.

For even without ISIL, even without al-Qaeda, instability will continue for decades in many parts of the world: in the Middle East, in Afghanistan and parts of Pakistan, in parts of Central America, in Africa and Asia. Some of these places may become safe havens for new terrorist networks. Others will just fall victim to ethnic conflict or famine, feeding the next wave of refugees. The world will look to us to help solve these problems, and our answer needs to be more than tough talk or calls to carpet-bomb civilians.

Later that year, acknowledging that the situation in Afghanistan was “precarious,” Obama said U.S. troop levels there would remain at about 8,400. They were due to decline to 5,500. But on Tuesday night, Trump’s remarks suggested those troop reductions may have been premature—and at any rate gave no indication how long they’d stay.