Of all the cities in Europe, the Spanish capital is second only to London for the number of clients it had on the database of the adulterers' website.
But in fact the data shows that a larger proportion of the population in Madrid are actively looking for an affair.
The information was revealed after hackers leaked the database of Ashley Madison, the dating website with the slogan: "Life is short – have an affair".
Ashley Madison uses the slogan "Life is short - have an affair". Photo: AFP
London had 179,129 people registered with the website meaning two percent of Londoners joined in the hopes of having an affair.
While Madrid, with just a third of the population of London boasted an impressive 135,294 philanderers on its books, meaning four percent of those in the Spanish capital had registered in search of an extramarital dalliance.
London and Madrid were the only two European cities to appear in the top 25 list. The city with the most registered was São Paulo with 374,542 accounts, followed by New York at 268,171 and Sydney with 251,813.
After examination of the data, visualization website Dadaviz produced a chart ranking the top 25 cities in the world by the number of Ashley Madison accounts they registered.
The information has been revealed after hackers on Tuesday leaked customer information stolen from the website, which encourages people in relationships to cheat on their partners and has 37 million users worldwide.
Madrid-based digital agency Malfideleco has taken the data dump of users' emails leaked by the hacking group calling themselves "Impact Team", and transformed the data into an interactive map (see below).
Malfideleco's map - which uses an online mapping tool called CartoDB - does not expose people's names or email addresses. But the map does indicate how widespread the service is.
A recent survey showed that Spaniards were the nation most likely to embark on a holiday romance and that the majority said that such an affair did not constitute cheating on their partner.