Striker Abdon Prats then put Mallorca ahead in the tie for the first time with eight minutes remaining, running from the halfway line unchallenged before unleashing a superb left-footed shot from outside the area which bulged the net.
Mallorca finished bottom in La Liga in the 2012-13 season and were relegated to Spain's third tier Segunda Division B in 2017 but are now back in the top flight thanks to successive promotions.
(Reporting by Richard Martin; Editing by Christian Radnedge)