The attack in Logar province sparked a gunbattle, said Abdul Rasool, the province's deputy police chief, but he said police suffered no casualties and he did not know whether any of the fighters were wounded or killed.
Rasool said the assailants fled after authorities dispatched soldiers to the area, and that security forces were searching the area.
Afghan police have hinted that the Taliban were behind the attack, but no one has claimed responsibility.
The Taliban government was overthrown as a result of the US-led invasion in late 2001.
An upsurge in violence across Afghanistan has left almost 1500 people dead this year.
In a separate attack on Nato-led forces, one soldier was in a "very serious" condition after the blast on Friday in the northern city of Mazar-e-Sharif, while the other two suffered minor injuries, the Swedish Armed Forces said in a statement.
Two civilians were injured in the attack, officials in Afghanistan said.