KABUL, Afghanistan — A feud that began when one police commander in western Afghanistan was accused of killing the civilian son of another has set off days of clashes, leaving four police officers dead, Afghan officials said.

Fighting between the sides continued Monday in Maimana, the capital of Faryab Province, as officers loyal to each of the commanders fired heavy weapons at one another’s houses in and around the city, local officials said. Each faction was from a different unit of the same provincial police force and represented a rival political party.

It was another indication of strife in Afghanistan’s shaky coalition government, which combines ethnic-based factions that in some cases have never quite moved past the civil war they fought in the 1980s and 1990s.

The latest outbreak began on Saturday when the head of Faryab Province’s police antiterrorism department, Ahmad Shah Malang, killed the son of Nizam Qaisari, the police commander in Qaysar, a neighboring district, according to the governor. The son, Burhanuddin Qaisari, a second-year law student at Herat University, had come home to Maimana during school vacation.