Indonesian police have shot dead four sword-wielding men who attacked a police headquarters in Sumatra, killing one officer, the latest in a spate of militant attacks across the Muslim-majority country.

National police spokesman Setyo Wasisto says the men attacked officers Wednesday after driving a minivan into Riau province's police headquarters.

He says a fifth man, who drove the vehicle, was arrested. One officer, who was hit by the minivan, died and two were injured.

Suicide bombings Sunday and Monday in Surabaya, Indonesia's second-largest city, killed 26 people, including 13 attackers. Two families carried out the attacks, using children as young as 7.