Real Madrid and Atletico Madrid have lost appeals against Fifa bans on signing players in the next two transfer windows.
The clubs contested a decision by world football’s governing body to punish them for breaching rules over the transfer of foreign players under 18.
Fifa initially ruled on the case in January, but the appeals meant both clubs could sign players this summer.
The Spanish sides will now appeal to the Court of Arbitration for Sport.
In a statement, 11-time European champions Real described the decision as “deeply unjust and contrary to the fundamental principles of disciplinary law”.
Atletico said they had already hired “a team of international experts to defend the case and protect the rights” of the club.
Fifa’s investigation concerned players aged under 18 who played in competitions for Atletico between 2007 and 2014, and Real from 2005-2014.
“Both clubs are to serve a transfer ban that prevents them from registering any players at national and international level for the next two complete and consecutive registration periods,” said a Fifa statement.
It added both clubs had been given 90 days in which to “regularise the situation of all minor players concerned”.
Atletico were fined 900,000 Swiss francs (£622,000), while Real were told to pay 360,000 (£249,000).