The driver of the vehicle that plowed into worshipers leaving a London mosque was caught on video being attacked by pedestrians screaming “Killer!” — then apparently blowing a kiss from the back of a police vehicle.

The madman ran into a crowd of people as they were helping an elderly worshiper who had collapsed after Ramadan night prayers at the Finsbury Park Mosque, officials said.

The man later died, though it was unclear if his death was caused by the attack, the Telegraph reported.

The 48-year-old attacker, who has not yet been identified, shouted about killing Muslims.

“I did the job … I done my bit!” a witness said the man shouted. “I’d do it again! I’d do it again!”

The defiant attacker tried to escape but was dragged out of his van and pinned to the ground.

“Pull his head up! Pull his head up!” one man yelled, Sky News reported.

“Take a picture of his face! F—- racist!” another shouted.

Amid the chaos, other people tried to calm the enraged crowd.

“Don’t worry, officers are here,” one man said before cops pulled the attacker from his captors as he seemingly tried to goad them on, yelling, “Come on!”

Moments later, he appeared to blow a mocking kiss from the back of a police van before being driven away.

The counter-terrorism command is leading the investigation, officials said.

“No matter what the motivation proves to be — and we are keeping an open mind — this is being treated as a terrorist attack,” said Neil Basu, senior national coordinator for counter-terrorism, The Guardian reported.

“This was an attack on London and all Londoners and we should all stand together against extremists whatever their cause,” he said, adding that the people struck were all Muslim.

Prime Minister Theresa May said she would be chairing an emergency meeting Monday.

London Mayor Sadiq Khan denounced the incident as a “horrific terrorist attack.”

“We don’t yet know the full details, but this was clearly a deliberate attack on innocent Londoners, many of whom were finishing prayers during the holy month of Ramadan,” Khan said.

“While this appears to be an attack on a particular community, like the terrible attacks in Manchester, Westminster and London Bridge it is also an assault on all our shared values of tolerance, freedom and respect,” he added.

Police said the attacker, who was taken to a hospital as a precaution, would be given a “mental health assessment.”

One witness who identified himself as Abdulrahman said he and his friends had stopped to help the elderly man on the ground at about 12.20 a.m. local time Monday.

“In seconds this terrible thing happened,”’ he told the Press Association. “Literally within a minute, a van with speed turned to where we were and ran over the man who was laying on the floor and the people around him, around eight people or 10 people got injured, some of them seriously. Thank God I’m safe, but my friends got injured.

“I managed to get the driver of the van when he came out of his van. He wanted to run away and was saying, ‘I want to kill all Muslims!’ So he came back to the main road and I managed to get him to the ground, and me and some other guys managed to hold him until the police arrived, for about 20 minutes I think, until the police arrived.”

Abdulrahman said the driver also yelled, “Kill me!”

“I said, ‘Tell me, why did you try driving to kill innocent people?’ When he went into the [police] van he made gestures, he was laughing. He deliberately did this. He caused this incident,” he said, according to The Guardian.

Eight people were taken to a hospital and two were treated at the scene, Reuters reported.

The attack comes just over two weeks after three Islamist militants drove into pedestrians on London Bridge and stabbed people at nearby restaurants and bars, killing eight.

It also follows a suicide bombing at a concert in Manchester in May that killed 22. In March, a man drove a rented car into pedestrians on Westminster Bridge in London and stabbed a police officer to death before being shot dead. His attack killed five people.