Robert Snodgrass grabbed the winner as Livingston lifted themselves off the bottom of the Scottish Premier League with a fine win over Dundee United.
The young striker scored with an excellent drive from the edge of the box for his fourth goal of the season.
Paul Dalglish, Jason Dair and Harald Pinxten had come close to giving Livingston the lead before then.
Two good saves from Ludovic Roy and two scrambles off their own line late on earned Livi a deserved victory.
United boss Gordon Chisholm had named an unchanged side, with Peter Canero back from injury but on the bench, after a fine win over Hibernian at Tannadice last weekend.
But it was Livi who were the more dangerous from the start.
Paul Dalglish just failed to get a touch on a dangerous cross across the face of goal from Richard Brittain.
Miller - part of a three-pronged United forward line with Collin Samuel and former Livi man David Fernandez - sent a header flying over at the other end as both sides searched for the opener.
Livi midfielder Jason Dair saw a 20-yard effort drift over after good lead-up work from Dalglish.
The home side came close again when defender Harald Pinxten flicked Brittain's free-kick just wide.
Dalglish tried his luck seven minutes before the break, but his well-struck 20-yard effort whistled over.
Livi opened the scoring when Snodgrass found room for himself on the edge of the box and fired an unstoppable left-foot shot into Derek Stillie's top left-hand corner.
United defender David McCracken lifted a 15-yard shot over when he could have hit the target as Livi sat in to protect their lead.
Dalglish flashed a shot wide on the break at the other end before Barry Robson should have scored with the Tannadice side's first shot on target after a full 74 minutes.
Robson beat two men on the left before cutting inside and firing in a shot that Roy saved well with his legs.
Samuel fired a long-range shot wide with Roy scrambling.
And Roy saved a powerful Alan Archibald header before McIntyre also headed wide from Peter Canero's cross.
Livi scrambled the ball clear twice on their own goal-line in the closing minutes to collect a vital three points.
Livingston: Roy, Mackay, Pinxten, Strong, Tierney, Brittain, Walker, Vincze, Dair (Scott 71), Dalglish (McPake 86), Snodgrass.
Subs Not Used: McKenzie, Dorado, Adam, Boyd, Tesevic.
Booked: Tierney, Walker, Pinxten.
Goal: Snodgrass 42.
Dundee Utd: Stillie, Wilson, McCracken, Ritchie, Archibald, Duff (Canero 71), Kerr, Fernandez (McIntyre 59), Robson, Samuel, Miller.
Subs Not Used: Samson, McInnes, Kenneth, Robertson, Goodwillie.
Booked: McIntyre.
Att: 3,845
Ref: C Thomson