Hearts progressed to the fourth round of the Scottish Cup with a scrappy win over Kilmarnock at Tynecastle.
Edgaras Jankauskas hit the post with powerful long distance shot before an enormous throw-in from Robbie Nielson was headed home by Steven Pressley.
Substitute Jamie McAllister then slid in to ram Calum Elliot's cut-back high into the net on 75 minutes.
With four minutes remaining Colin Nish bundled in a goal for Kilmarnock but the Edinburgh side held on.
The home side made most of the early running and, in the fourth minute, Jankauskas thundered a shot from 30 yards which crashed off the post, the rebound falling to Rudi Skacel who was ruled offside.
Soon after, Killie youngster Steven Naismith scampered down the right but, when his cut-back found Allan Johnston 10 yards out, the former Hearts favourite scuffed his shot past the post.
Johnston then fired a fired into the side-netting from the edge of the area after twisting his way past Neilson.
However, the Hearts full-back was soon to play a key role in the opening goal.
His huge throw-in looped into the penalty area and Pressley leapt highest to glance the ball into the net from close range.
In the 37th minute Gary Wales was taken off after a challenge by Neilson which appeared to damage his nose, the Killie striker replaced by Paul di Giacomo.
The home side were also dealt a blow just two minutes before the interval when Jankauskas limped off to be replaced by Michal Pospisil.
Skacel then fired in a cross-cum-shot from wide on the right which nearly crept in at the far post.
Kilmarnock started strongly after the break and di Giacomo's poor first touch saw a chance wasted.
After 53 minutes the Hearts defence was carved open when Colin Nish set up Naismith but the Killie striker was off-balance and his shot from eight yards narrowly missed the target.
On the hour Skacel's drive through a ruck of players from 12 yards was parried by Alan Combe before the Killie defence got the ball away.
Elliot then tested the Killie keeper with a shot from 14 yards before Hearts were denied a strong penalty claim when Pospisil had his shirt tugged.
With 15 minutes remaining, McAllister extended Hearts' lead when he diverted a low cross from Elliot into the top corner of the net.
Kilmarnock have a habit of scoring late goals and Nish ensured a nervous finish when he managed to force the ball over the line from a Stephen Murray cross on 86 minutes.
The visitors threw men forward in the final stages but could not fashion an equaliser.
Hearts: Gordon, Neilson, Pressley, Webster, Fyssas, Mikoliunas (McAllister 70), Hartley, Brellier, Skacel, Elliot (Berra 90), Jankauskas (Pospisil 44).
Subs Not Used: Banks, MacFarlane.
Goals: Pressley 24, McAllister 75.
Kilmarnock: Combe, Wright, Greer (Murray 74), Ford, Lilley, Fowler, Naismith, Johnston, Hay, Wales (Di Giacomo 38), Nish.
Subs Not Used: Bell, Dodds, Loy.
Booked: Fowler, Nish, Hay.
Goal: Nish 86.
Ref: A Freeland