President Joe Biden defended his decision to withdraw U.S. troops from Afghanistan on Sunday, as chaos unfolded in the country a day after the Taliban seized the capital.

In remarks from the East Room of the White House, Biden argued that an indefinite American military presence in the country would not have saved the Afghan government.

“I stand squarely behind my decision,” Biden said. “After 20 years, I’ve learned the hard way that there was never a good time to withdraw U.S. forces.”

Biden also acknowledged that the collapse of the Afghan government “did unfold more quickly than we had anticipated.” He said he had ordered 6,000 troops to help evacuate American citizens and vulnerable Afghan civilians from the airport.

Hundreds of people could be seen chasing military planes on the tarmac, and at least two people fell to their deaths after clinging to the wheels of a departing plane.

Biden said “the buck stops with me,” but laid much of the blame for the situation on the Afghan government. He said some had not fled sooner because they did not want to trigger a “crisis of confidence,” or still had hope for their government.

He said the events of the last week had underscored that no amount of American involvement would have salvaged the situation, and that ultimately his decision was the right one.

“We gave them every chance to determine their future,” Biden said. “What we could not provide them was the will to fight for that future.”

Biden announced in April that the U.S. would honor its commitment to withdraw from the country, beginning in May, with a complete departure by Sept. 11. At the time, Biden said the withdrawal would be done “responsibly, deliberately and safely.”

The speed of the collapse took Washington by surprise, with the government forces falling to the Taliban across the country in just days.