Mallorca through to King's Cup quarters
Mallorca substitute Mario Suarez fired in from close range to complete an exciting comeback and avoided extra-time at a rainswept Ono Estadi.
Visiting Rayo, who won the first leg 2-1 last week, had opened the scoring with a breakaway effort from striker Piti on the stroke of halftime.
Mallorca have won every home game this season, and rallied with Victor heading in at a corner in the 50th minute, and then firing in at the far post 10 minutes later.
Mallorca will meet Getafe in the last eight.