Champions Real Madrid suffered an embarrassing defeat at La Liga first-timers Girona and are now eight points behind league leaders Barcelona.
Real’s world player of the year Cristiano Ronaldo was closely marked by former Middlesbrough centre-back Bernardo, but it was the Portuguese’s shot which goalkeeper Yassine Bounou parried for Isco’s opener.
Girona continued to go on the offensive in the second period and turned the game around in the space of four minutes.
Another former Boro player, Stuani, coolly tucked in the leveller, before Portu’s instinctive strike sealed a famous victory.
On-loan Manchester City full-back Pablo Maffeo and Portu both struck the woodwork for the home side.
Isco had given Real a first-half lead by tapping in from close range.
The result leaves Zinedine Zidane’s side in third place after 10 games behind unbeaten Barca and Valencia, while Girona collected just their third victory of the season.