MADRID — The police opened fire on Tuesday after the driver of a stolen truck carrying butane gas, and moving at high speed near Barcelona’s main ring road, refused to stop.

Although there were no fatalities, the chase quickly raised tensions in Spain, which remains on high alert after major terrorist attacks in other European countries, including deadly episodes involving trucks in Nice, France, and in Berlin.

The police said that the driver had been taken into custody. They described him as a 32-year-old man with a Swedish passport who was not a resident of Barcelona, but did not identify him further.

Joan Carles Molinero, a regional police chief, said during a news conference in Barcelona that the driver’s motives were unclear, and that terrorism was not one of the lines of investigation.