Spanish police on Monday shot dead an Islamist militant who killed 13 people with a van in Barcelona last week, ending a five-day manhunt for the perpetrator of Spain's deadliest attack in over a decade.

Police said they tracked 22-year-old Younes Abouyaaqoub to a rural area near Barcelona and shot him after he held up what looked like an explosives belt and shouted "Allahu Akbar" (God is Greatest). A bomb squad then used a robot to approach his body.

Abouyaaqoub had been on the run since Thursday evening, after he drove at high speed into throngs of strollers along Barcelona's most famous avenue, Las Ramblas. After fleeing the scene, he hijacked a car and fatally stabbed its driver.