The terrorist car crash in Las Ramblas killed 13 people and injured 100 others.
The attack took place near Catalan Square in Las Ramblas, Barcelona.
The IS has claimed responsibility for the attack through the Amaq news agency.
A Spanish citizen from the Melilla region - a territory of the country in North Africa - and a man from Morocco have been arrested on suspicion of being involved in the incident.
All metro stations and train stations have been closed, and tourists have been evacuated from the scene.
Among the victims of the truck attack in Barcelona were many foreigners. According to the police, there are at least 18 different natures.
A spokesperson for the Spanish civil defense agency said that French citizens, Germany, Spain, the Netherlands, Argentina, Venezuela, Belgium, Australia, Hungary, Peru, Romania, Ireland, Greece, Cuba, Macedonia, China, Italy and Algeria were among the casualties.
Tourists were evacuated from the scene of the Barcelona attack.
Police said the attack was related to a house explosion in Alcanar, Spain several hours earlier. The explosion caused part of the building to collapse, injuring one person and others.
In addition, another car tried to get past a police checkpoint in Barcelona. The incident left 1 person dead and 1 other injured.
Catalan police have also warned of a possible terrorist attack in the coastal town of Cambrils, south of Barcelona.
Spain declared 3 days of national mourning to commemorate the victims. The memorial service will be held this afternoon at Plaza de Catalunya with the court of Spanish King Felipe VI.
Las Ramblas was a famous tourist destination in Barcelona, Spain, with many tourists at the time of the attack.