A would-be bikejacker in Lisbon got more than he bargained for when the cyclist who was his intended victim turned out to be heading to a group ride setting out from a police academy in the Portuguese capital.

Footage of the incident was posted to YouTube by the cyclist, Carlos André, who said he had picked up a test bike from a shop on his way to join a mountain bike ride organised by the Public Security Police.

According to a report on the website Noticiasaominuto.com, the man had already tried to stop Mr André once without success, trying to grab his arm, then took a bus and got off once he had passed the cyclist to try again.

Mr André fended off his attacker, then when he reached his destination – the Instituto Superior de Ciências Policiais e Segurança Interna police academy – called out for assistance.

Given the way that some of the cyclists managed to restrain the man, and the fact that uniformed police seemed happy to let them get on with it, we assume they were themselves police officers.

In a comment to his post on YouTube, Mr André said he hoped that justice would prevail and that according to police sources, the same man had assaulted a tourist riding in a tuk-tuk – used to give tours of the city – earlier the same day.