"We detained a person who was of Swedish nationality," a spokesman for the regional police said.
Barcelona's city hall said the truck had been stolen.
There was no indication as yet whether this was an attempted attack or just a plain robbery.
‘Draconian’ EU anti-terror laws target Muslims
The truck was driving on the wrong side of a ring road in the popular Spanish Mediterranean resort city.
Police did not say whether there were any injuries.
Around 20 police officers and at least six police cars were on site, and several gas bottles were lying on the ground.
The trace of at least one gunshot was visible on the windscreen of the truck, which was small.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ