Scottish Second Division champions Livingston maintained their unbeaten home record this season with a 3-2 win over second-placed Ayr.
The Lions, who are also now undefeated in 11 league matches, took the lead after 31 minutes, Joe Hamill crossing for Craig Barr to head home from inside the box.
United were level nine minutes later through Mark Roberts' penalty after David Sinclair's foul on Ryan McCann.
Sinclair made up for giving away the spot-kick by putting the home side back in front 66 minutes in with a long-range strike.
Raffaele De Vita then slotted home from inside the box two minutes later to make it 3-1 to Livingston.
Ross Robertson netted Ayr's second after 90 minutes scoring easily from Andy Rodgers' cross but the hosts held on to win.