Paulo Gazzaniga and Rayo Vallecano suffered a 2-1 defeat to Córdoba in their final home game of the season this weekend.
Despite taking an early lead through Raúl Baena, Vallecano were pegged back almost immediately by Córdoba's Javier Galán.
The visitors then netted a winner in the second half, as substitute Alfaro slotted past Gazzaniga to help Córdoba up to 12th in the Spanish Segunda División table.
Vallecano remain 15th and three points clear of the drop zone ahead of their final game on the season away against Sevilla II on Friday.