Afghan President Ashraf Ghani delivers a speech Tuesday at the opening of a peace conference at the presidential palace in Kabul. (Shah Marai/AFP/Getty Images)

As officials from around the world gathered in Kabul for a peace conference, Afghan President Ashraf Ghani said that far more people were killed in last week’s massive truck bomb explosion than initially reported — more than 150, making it the deadliest attack in the capital in years.

Ghani said Tuesday that his country is under siege from the Taliban and the Islamic State but is also enmeshed in an “undeclared” war with neighboring ­Pakistan. He urged the international community to “make good on its promise” to end state-sponsored terrorism.

“It is time to get serious . . . because our region is under threat,” Ghani said.

As if to underscore the fragile security in Kabul, a rocket landed less than a mile from the presidential palace, where the talks were taking place. It hit outside a diplomat’s home not far from the NATO headquarters and the U.S. Embassy, but no casualties were reported.

Also, at least nine people were killed and 15 wounded when a bomb attached to a motorcycle went off outside the entrance of the renowned Great Mosque in the western city of Herat, according to a government spokesman. The Taliban denied responsibility.

Ghani warned the Taliban — which is steadily gaining ground and controls 40 percent of Afghanistan, according to U.S. estimates — that his government wants talks but that the olive branch will not be offered indefinitely.

“We want to talk with the Taliban, but it is not an open-ended opportunity,” Ghani said. “If the Taliban wants to join peace talks, the Afghan government will allow them to open an office, but this is their last chance.”

Peace talks with the insurgent group have faltered, and the Taliban said Tuesday that it will negotiate directly with the government only after foreign troops leave Afghanistan. But instead of drawing down, the United States is weighing a request to increase the number of U.S. troops in the country by up to 5,000, in addition to the 8,500 already deployed in advisory and support roles.

As for the Islamic State threat, Ghani put the number of foreign fighters flowing to Afghanistan to join the Islamist militant group at 11,000, far higher than the 1,200 to 1,500 previously estimated by the country’s intelligence services.

Ghani said Pakistan was waging an “undeclared war” against Afghanistan. His government has claimed that the suicide bombers who attacked a funeral attended by high-level government officials Saturday were financed and trained in Pakistan, charges that Pakistan has denied. Twenty people died in that attack.

Experts say that the peace conference is largely “symbolic” and that nothing will be decided until there is a better understanding of the Trump administration’s evolving policy in the region.

“What we have seen is a fragmentation of regional and international consensus on Afghanistan, mainly created by the absence of U.S. leadership and direction. One hopes this meeting today in Kabul provides more clarity from Washington,” said Davood Moradian, director of the Afghan Institute for Strategic Studies in Kabul. “The region is not sure now whether the United States is part of the problem or part of the solution. And the Afghan government is increasingly seen as part of the problem, with its internal divisions.”

The U.S. Embassy said in a statement that the recent attacks “underscore the need for all those who support peace to reassert their commitment to fight terrorism in all its forms.”

Security remained heightened around Kabul’s diplomatic zone, the site of last week’s deadly truck bombing, and roads were blocked off. Anti-government demonstrators hunkered down on a street not far from the palace, chanting slogans such as “Death to Ghani” and “Death to America” through a megaphone. Six protesters were killed Friday in clashes with security forces.

“It is really difficult to be optimistic for peace with the Taliban and other armed oppositions when Kabul has witnessed such a tragedy,” said Sayed Hamed Daqiq, a former government official who is now a political analyst. “With the current government leadership, it is nothing more than a dream.”

Sharif Walid contributed to this report.