Williot Swedberg scored in the 87th minute as Celta Vigo defeated Almeria 3-2 for their first Spanish league victory of the season.
The 19-year-old Swedish midfielder netted the winner with a late header after Unai Nuñez and Jorgen Strand Larsen gave Celta a 2-0 lead before half-time.
Sergio Akieme and Sergio Arribas equalised for the hosts in the second half.
Rafa Benítez's Celta entered the fourth round coming off two losses and a draw.
Almeria remained winless and picked up their third loss in four matches. They stayed second-to-last and in danger of dropping to the bottom of the standings at the weekend.
Cadiz picked up their second win and moved closer to the top by coming from behind to defeat 10-man Villarreal 3-1 at home with a pair by Darwin Machís.
The visitors took the lead through Alexander Sorloth in the 10th but Cadiz rallied thanks to Chris Ramos in the 18th and Machís in the 30th and 50th minutes.
It was the third loss in four matches for Villarreal, who played a man down from the 22nd minute because Alfonso Pedraza was sent off.
Villarreal coach Quique Setién was also sent off, and Sorloth had to be replaced because of an injury in the 27th.