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).
The next two transfer windows are in January 2017 and the summer of the same year. It means the clubs will not be able to register new players until 2018.
This summer, Real Madrid’s new arrivals 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.
In April 2014, Barcelona were banned from signing players in two successive windows after they also breached rules on the transfer of under-18 players.
Their ban, which ended in January 2016, did not stop the La Liga side from signing players.
They bought Arda Turan and Aleix Vidal in 2015, though both players were prevented from playing until the January 2016 window opened.