The police force for Spain's Catalonia region says its troopers shot and killed five suspects in a resort town south of Barcelona to "respond to a terrorist attack."
The confrontation came about eight hours after a van swerved through a pedestrian walkway in a popular destination in downtown Barcelona, killing 13 people and injured an estimated 100 more.
The regional police said on Twitter early Friday that troopers fired on the five suspects in Cambrils, a seaside town about 100 kilometers (62 miles) from Barcelona.
The regional police said in another tweet that they are investigating whether the Cambrils suspects were wearing explosive vests. Its officers planned to carry out several controlled explosions.
The force says it is working on the theory that the Cambrils suspects were linked to the Barcelona attack, as well as to a Wednesday night explosion in the town of Alcanar in which one person was killed.
U.N. Secretary-General Antonio Guterres is condemning the terrorist attack and extending his condolences to the families of those killed.
His spokesman, Farhan Haq, said the secretary-general "wishes a speedy recovery to those injured and hopes that those responsible for this heinous violence will be swiftly brought to justice."
"The United Nations stands in solidarity with the Government of Spain in its fight against terrorism and violent extremism," the statement said.
Spain's public broadcaster, RTVE, is reporting that the suspects shot and killed south of Barcelona may have been carrying suicide explosive belts.
The broadcaster said the suspects tried to carry out a similar attack to the one in Barcelona. It said seven people were injured by the suspects, two seriously.
The channel ran a video of Cambrils' promenade in which volleys of gunshots could be heard while sirens wailed and people's screams could be heard.