Newcomer Girona stunned Real Madrid with a 2-1 victory in the defending champion's first trip to Catalonia since Spain's political crisis escalated.
The result left Madrid eight points behind Spanish league leader Barcelona, which on Saturday won 2-0 at Athletic Bilbao for its ninth victory in 10 league matches.
Second-place Valencia, which won 2-1 at Alaves on Saturday, is four points off the lead.
Despite security concerns ahead of the Spanish capital team's visit to the region which has been fighting for its independence from Spain, there were no major incidents before, during or after the game in Girona, a city filled with separatist sentiment just north of Barcelona.
Several pro-independence flags were on display at the small Montilivi Stadium, and the crowd sang "freedom" chants, but nothing disrupted the match.
Isco put Madrid ahead after a counterattack in the 12th minute but the hosts rallied in the second half with goals by Christian Stuani in the 54th and Portu in the 58th.