Kabul, Afghanistan (CNN) -- Fourteen suspected terrorists died Tuesday night when the bus they rigged with explosives blew up prematurely, police said.

The explosion occurred as the suspects were riding the bus in the province of Kunduz, said police chief Abdul Raziq Yaqobi.

Yaqobi said the suspects wanted to attack Afghan police or foreign soldiers.