Police believe the cell members had planned to fill the vans with explosives and create a massive attack in the Catalan capital.
It said armed police called to the scene “liquidated” the attacker following the stabbing.
The man carried out attacks on passers-by, causing stab wounds to 8 at around 11:20 am local time.
Cars, trucks and vans have been the weapon of choice in multiple extremist attacks in Europe in the last year.
The RS personnel who were wounded are being treated at the US military hospital at Bagram Airfield.
Israel installed the metal detectors in response to an Arab attack that killed 2 Israeli police guards at the Muslim-administered holy site.
A crowd estimated at more than 8,000 turned out for a demonstration called by Islamist movements and leftist parties.
Four of them were from Uttar Pradesh, 3 from Kerala, 1 from Bihar, 1 from Tamil Nadu and details of 2 others were yet to be ascertained.
There was no immediate claim of responsibility for the attack, but the ISIS frequently carries out suicide bombings targeting civilians.