KABUL, Afghanistan — Taliban insurgents in Afghanistan have taken over most of the rural areas in Ghazni Province, even as they continue to battle the government for control of the provincial capital, according to local officials and residents.

While attention in the past four days has focused primarily on the fight for Ghazni city, where the Taliban appear to control most neighborhoods, the insurgents have also taken over at least four more rural districts in the province, mostly without much of a fight. They have also consolidated their authority in other districts, as local government officials fled.

By Monday, only two of the province’s 18 rural districts were confirmed to be completely in government control. That raised the prospect that if the insurgents did fully take the city, they might also be in a position to control an entire province for the first time in the 17-year war in Afghanistan.

In the city, government forces, supported by American military airstrikes and some American ground forces, continued on Monday to hold government buildings, the Police Headquarters and prison, and military bases. Officials and residents disputed Taliban claims that those facilities had fallen on Monday, but residents said the government buildings were under constant attack, and Taliban fighters were in apparent charge of most neighborhoods throughout the city.