Sean Clare's first Hearts goal took the Edinburgh club into the Scottish Cup last 16 at Livingston's expense.
A sublime finish by the English midfielder early in the second half secured progress and some revenge for the 5-0 league mauling Hearts suffered against the same opponents in December.
Clare arrived at Tynecastle Park last September on a three-year contract after leaving Sheffield Wednesday. He and has taken time to find his feet in Scotland. His first goal in maroon was worth the wait. He slotted a perfect curling effort into the corner of the net on 47 minutes from new signing David Vanecek's lay-off.
That was sufficient to propel Hearts into the next round of the Scottish Cup. Livingston competed well on the day and created several scoring opportunities of their own, but were ultimately undone by a moment of quality from Clare.
New Hearts signings Vanecek and Conor Shaughnessy both made competitive debuts in front of the BBC One Scotland television cameras. Livingston named one of their new arrivals, Gregg Wylde, in the starting line-up and left the other, Chris Erskine, on the substitutes' bench.
After a minute's silence to honour the recent passing of Hearts legend Freddie Glidden, the game began in predictably competitive fashion. The visitors opened with plenty confidence after that 5-0 win a few weeks ago and weren't frightened to send balls in behind the opposition defence.
Although Hearts probed, they were unable to breakthrough and were wary of Livingston's quick counter-attacks. A lofted forward ball on 22 minutes landed for Alan Lithgow to volley across the face of goal and narrowly wide. Ryan Hardie rejoined Livingston on loan from Rangers a few days ago and his headed flick from Keaghan Jacobs' corner was also tantalisingly close.
Hearts came to life as the interval approached and midfielder Olly Lee dispatched a 25-yard shot. Liam Kelly in the away goal quickly adjusted his feet to account for the swerve on the ball and held it strongly. He also denied Steven Naismith with a breathtaking one-handed stop seconds later, although the offside flag was up as Callumn Morrison's cross arrived at the Scotland forward's feet.
Morrison looked to be the hosts' most useful attacking outlet on the right flank as the first half progressed. Vanecek was hoping to feed off crosses but was somewhat malnourished in that regard. Livingston's tactics were to send the ball forward directly and try to get defenders in maroon turning.
The deadlock was broken two minutes into the second period. Some neat build-up play involving Naismith and Vanecek ended with the Czech's lay-off into Clare's path. The Englishman didn't even need to break stride as he advanced to curl a perfect first-time finish beyond Kelly into the far corner of the net.
The Livingston captain Craig Halkett prevented a certain second soon after when he cleared Morrison's low shot off the goal line. However, at the opposite end there was a reminder of Hardie's ability. The striker collected Scott Pittman's pass for an angled drive which fully tested the Hearts goalkeeper Colin Doyle. Halkett drove another shot in from distance which the Irishman punched clear.
Time was running out on Livingston's Scottish Cup ambitions and they forced the issue entering the closing stages. Balls were showering down on the Hearts penalty area but were mainly met and repelled by the club captain Christophe Berra.
In the end, Clare's strike was enough to decide the game and send a contented home side through to the fifth round.
Hearts (4-4-1-1): Doyle; M Smith, Shaughnessy, Berra, Garuccio; Morrison (Mulraney 86), Lee, Djoum, Naismith; Clare (Bozanic 80); Vanecek. Unused subs: Zlamal, Mitchell, MacLean, Dikamona, Keena.
Livingston (3-5-2): Kelly; Gallagher, Halkett, Lithgow; Lawless, Pittman, Jacobs, Byrne, Wylde (Lamie 60); Menga (Hamilton 75), Hardie (Erskine 71). Unused subs: Stewart, Sibbald, Cadden, Lawson.
Referee: Willie Collum.