KABUL — A sustained rocket attack shook the Afghan capital Tuesday morning just as President Ashraf Ghani was delivering a speech marking the beginning of Eid al-Adha, a three-day festival that is the most important holiday on the Muslim calendar.

There were no reports of casualties from the dozen short-range rockets fired, and no group immediately asserted responsibility. The Taliban issued a statement saying it had no role in the attack.

The insurgent group’s leaders have not responded to Ghani’s offer on Sunday of a conditional three-month truce. Some Taliban leaders said Monday that they were still discussing the proposal, and the group has sent out conflicting signals.

As Ghani spoke from his palace Tuesday, the rocket fire could be heard across the city. During the broadcast, the president calmly acknowledged the threat of violence and made clear that the government had been expecting attacks during Eid.

“We announced a cease-fire, providing it is bilateral,” he said. “But all were ready to believe that some groups and individuals who believe in plots and bloodletting will resort today to acts that would jeopardize the tranquility of the Afghan nation.” 

“If they believe they can subdue this nation with this rocketing, they should rethink that,” he said.

The interior minister later said that three attackers were killed when a helicopter gunship bombed  a warehouse in which they were holed up near the Defense Ministry, several blocks from the presidential palace.

The Afghan public and the government’s international backers, led by the United States, have been hoping that a successful cease-fire in June, followed by unprecedented private talks between Taliban representatives and U.S. diplomats, would lead to a second and more extended truce and a revival of long-abandoned peace talks aimed at ending the 17-year war.

But some analysts expressed skepticism after the insurgents this month attacked the strategic city of Ghazni, leaving 120 people dead before the militants were driven out by Afghan forces and U.S. airstrikes.

Since Ghani’s offer Sunday, the insurgents have made no direct answer but have sent mixed messages. The group first issued a statement saying it intended to release 300 prisoners, but Taliban fighters kidnapped about 150 bus passengers on Monday in Kunduz, a reminder of the militants’ ferocious assault on that northern city in 2015.

Most or all of the passengers were rescued unharmed by Afghan security forces, according to varying official accounts.

Meanwhile, Russian officials announced that they had invited the Taliban to attend an international meeting in Moscow on Sept. 4 related to the Afghanistan conflict and that the insurgents had accepted. They said it would be the first such meeting involving the insurgents. Taliban officials in Kabul did not comment on it. The Russians also invited U.S. officials, but the State Department said Tuesday that none would attend.

On Sunday, Taliban leader Haibatullah Akhundzada issued a message that appeared to reject a truce or peace talks, insisting that the “lone option” for ending the war would be the complete withdrawal of U.S. and foreign troops.

“May God bestow victory on the mujahideen. . . . Our jihadi struggle against the American occupation is on the threshold of victory,” Akhundzada said. He asserted that “bringing peace and security is among the highest priorities of the Islamic Emirate, but peace will remain elusive during an occupation, and no salvation is possible without the establishment of an Islamic authority.”

Sayed Salahuddin contributed to this report.