The terrorist who killed 13 people by plowing a van along a tourist thoroughfare in Barcelona was fatally gunned down by cops Monday as he wore a fake explosives belt and shouted, “Allahu akbar.”

Police all across Europe had been on a manhunt for Younes Abouyaaqoub, 22, and cops caught up with him just 37 miles from Barcelona in the village of Subirats,

Locals recognized the young jihadist and tipped off police, who found him hiding in a vineyard. When he opened his shirt to reveal what looked like a suicide belt and shouted “God is greatest” in Arabic, the cops opened fire.

With the aid of a bomb-disposal robot, authorities found that the belt was bogus.

Abouyaaqoub was the only member of the 12-person terror cell who hadn’t already been captured by police or killed during a second assault in Cambrils early Friday.

ISIS has claimed responsibility for both attacks.

After ramming a white van along the popular Las Ramblas promenade, Abouyaaqoub fled on foot amid the pandemonium.

Before capturing him, police released photos of the killer wearing sunglasses and strolling away from the carnage through the La Boqueria market just off Las Ramblas.

He then hijacked a Ford Focus after fatally stabbing its driver, Pau Perez, 34, and crashed it through a police checkpoint, breaking an officer’s leg in the process.

Perez’s body was found in the back seat of the car in Sant Just Desvern outside Barcelona on Friday, Agence France-Presse reported, but Abouyaaqoub was nowhere to be found.

His mother, Hannou Ghanimi, had appealed for him to surrender, saying she would rather see him in prison than end up dead.

Ghanimi said her son and the other young men behind the attacks had been radicalized by a local imam, Abdelbaki Es Satty.

“Since the imam arrived here, everything changed about the young boys,” she said.

Es Satty, who had links to the 2004 Madrid train bombings, had been grooming the men for at least a year, and would often talk to them secretively inside his van, a cousin of two of the attackers told El Pais.

By Ramadan in June, they had “lost their fear of dying,” he added.

Es Satty died the day before the attack, when the terror cell’s bomb-making factory exploded, police announced Monday.

With Post wires