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 the 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.
Real Madrid has said that the club will now appeal to the Court of Arbitration for Sport (CAS).
The 11-time European champions described the decision in a statement as “deeply unjust and contrary to the fundamental principles of disciplinary law”.
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,” FIFA said in a statement.
It added that both clubs had been given 90 days in which to “regularize the situation of all minor players concerned”.
Atletico were fined 900,000 Swiss francs (£622,000), while Real were asked to pay 360,000 (£249,000).
The next two transfer windows are in January 2017 and the summer of the same year.
Real Madrid’s new arrivals this summer included Brazil midfielder Lucas Silva from Marseille, and striker Alvaro Morata returning to the club from Juventus for 30m euros (£25m).
Atletico signed France striker Kevin Gameiro, Croatia defender Sime Vrsaljko, Italy winger Alessio Cerci and Argentina midfielder Nicolas Gaitan.