The group targeted tourists leaving the airport and hotels in the capital, pulled them over and presented fake badges before robbing them of valuables and making a quick getaway.
Spain's National Police force said in a statement that at least 21 different crimes were attributed to the gang, who were comprised of eight members with Iranian and Pakistani passports.
Using fake insignia on their cars, the gang forced tourists who had just arrived in Spain to pull over on the hard shoulder and after showing them fake police badges insisted on conducting a search of the vehicles.
They then demanded cash and other valuables and made a speedy getaway.
"After pulling them over at the side of the road, they identified themselves as policemen and asked to search their vehicles on the pretext that they were looking for counterfeit notes and drugs. Once they had the valuables in their hands they made off at great speed," said the police statement.
Eight people were arrested in raids on there properties when police seized over €1000 in cash, foreign currency, 15 smart phones and jewellery as well as the fake documentation they used to pretend to be policemen.
Six different vehicles used in the robberies were also seized.
Police said at least 21 separate robberies attributed to the gang had been reported but suspect "others may have gone unreported because the victims were only in the country a brief time and may not have had time to report it to the police."
Unfortunately, robbers posing as fake policemen is a common scam in Spain.
Remember that the police are unlikely to approach you unless your behaviour seems suspicious or you are inebriated; moreover, they certainly wouldn't ask to go through your wallet. While a real policeman could ask for your documentation, he wouldn't do it before showing you a police badge of his own.