Kabul, Afghanistan — It might seem like an inauspicious moment to try for a truce.

But Afghan President Ashraf Ghani did so on Sunday, declaring a cease-fire to coincide with this week’s Eid al-Adha holiday, one of the most important occasions on the Muslim calendar, and then be extended for up to three months.

The only catch: The Taliban must sign on too.

“I announce a conditional cease-fire starting from Monday until Nov. 21, birthday of the Prophet Muhammad,” Ghani said in a nationally televised address marking Afghanistan’s Independence Day, according to news agencies.

There was no immediate word on whether the Taliban would agree to the cease-fire, which was called despite a recent burst of bloodshed and came on the heels of a previous truce that proved short-lived.

Secretary of State Michael R. Pompeo welcomed Ghani’s move, provided the Taliban cooperate, and added that Washington stood ready to support direct peace talks between the Afghan government and the Taliban.

“This plan responds to the clear and continued call of the Afghan people for peace,” Pompeo said in a statement.

But the secretary also alluded to the collapse of the most recent truce attempt.

“The last cease-fire in Afghanistan revealed the deep desire of the Afghan people to end the conflict, and we hope another cease-fire will move the country closer to sustainable security,” Pompeo said.

In June, the Afghan government announced a unilateral cease-fire with the Taliban during the last major Muslim holiday, Eid al-Fitr. It largely held, but the insurgents spurned a call to extend that truce.

Then, this month, the Taliban launched a major offensive on the southeastern city of Ghazni, which the government said killed at least 100 members of the Afghan security forces and some two dozen civilians, together with scores of Taliban fighters.

Five days of pitched fighting in a city just 75 miles from the capital, Kabul, was finally quelled after U.S. airstrikes and the dispatch of American military advisers to aid the Afghan government side. Afterward, whole neighborhoods had to be painstakingly cleared of explosives laid by the Taliban.

Ghani’s cease-fire call came during ceremonies commemorating the 99th anniversary of the Anglo-Afghan Treaty of 1919, which is marked as the country’s Independence Day.

Recent signs, though, have been ominous. Ghani’s overture came only a day after Taliban leader Mullah Haibatullah Akhunzada declared that there could be no peace as long as foreign troops remained in Afghanistan.