Phone group Telefonica, banking giant Santander or energy group Iberdrola were among the companies which benefited from the tax break, fuelling the purchases about a decade ago.
According to Spanish newspaper El Pais, these tax breaks amounted to tens of millions of euros and even several billions of euros in the case of Telefonica.
The European Commission said the scheme amounted to illegal state aid as it benefited Spanish corporate buyers at the expense of rivals considering to acquire the same targeted company.
At the height of use of the tax breaks, and before the eurozone crisis plunged Spain into economic depression, Telefonica bought British rival O2 in a blockbuster deal, and Iberdrola snapped up Scottish Power.
The commission opened an official probe in 2007, asking Spain to cancel the measure immediately, which it did though without recovering the credits allowed up to that point.
In 2012, Spain unveiled a new version of the tax law, and it was this interpretation that EU regulators rejected on Wednesday.
With the decision, beneficiaries of the tax break "must repay the Spanish state," the commission said in a statement, without naming the companies or amounts.
"We are not in a position to give the amounts involved, and we await that information from the Spanish tax authorities," said Antoine Colombani, a spokesman for Competition Commissioner Joaquin Almunia.