MADRID — A man accused of surreptitiously taking videos up the skirts of more than 500 women in Madrid has been arrested, the Spanish police said Wednesday.

The man, identified only as a 53-year-old Colombian living in Madrid and working in a warehouse, filmed women in the city’s subway system, on trains and in supermarkets, the police said. His arrest followed a lengthy investigation that the police began after running across a pornographic website that contained some of his videos.

The man filmed 555 women, at least two of them minors, according to the preliminary investigation. In some of the 283 “upskirt” videos that he posted online, he showed the women’s faces, investigators said. He searched for victims daily and “in a compulsive manner,” according to the police, once filming 29 women on a single day.

The police also released a video of the arrest, in which officers are seen wrestling the suspect to the ground on a subway platform and handcuffing him. The police said the officers arrested the man after watching him film under a woman’s skirt, using the camera of a phone hidden in a pocket of his backpack.

The police seized a laptop and three disks containing videos from the man’s home. In a statement, they described him as “one of the biggest predators of women’s privacy.”

He is believed to have begun uploading his videos to the pornography site in July 2018. While most of the women were filmed surreptitiously on public transportation, the police said that some videos showed that the man had introduced himself to victims in supermarkets or other shops.

The practice of “upskirting” has become common enough to set off political debates in countries including Britain, where women’s rights advocates have pushed for the introduction of specific criminal legislation to tackle the issue.

The practice is a crime in Spain, but few court cases have emerged, and judges have sometimes taken into account whether the videos included facial images that could help identify the victims.

Roberto Fernández, a Spanish police inspector who handles technology crime, told reporters that the man lived a quiet life in the Madrid suburb of Usera, while working in a warehouse in Pinto, a municipality south of the capital. He apparently used his daily commute to film the women who traveled alongside him, then edited his videos, setting them to music and sometimes adding slow-motion effects, Mr. Fernández said. So far, the police have identified 29 of the women who were filmed.

The police said the suspect uploaded at least 283 videos to the pornography website, building an online profile with 3,519 subscribers and almost 85,000 visitors who viewed his posts almost 1.4 million times.