A Luis Suarez strike two minutes from time squeezed Liverpool into the group stage of the Europa League.
Hearts had led for three minutes thanks to a David Templeton strike that was spilled into his net by Pepe Reina.
But they could not hold out for extra-time as Suarez eventually notched the goal he had been threatening all match.
/football on Youtube brings you the latest football news, transfer rumours and footballing gossip from the English Premier League and European Champions League.