Robbie Muirhead celebratesImage source, SNS

Livingston leapfrogged Ayr United into second place in the Scottish Championship with a dramatic win at Somerset Park.

The visitors were ahead at half-time courtesy of a Danny Wilson header, but substitute Marco Rus scored a fabulous solo run equaliser.

But Livingston grabbed all three points to remain within four points of leaders Falkirk with a sensational 95th-minute 30-yard free kick from Robbie Muirhead.

Ayr are a further point back in third place.

"It's a three-horse race, but it underscores that we need a bigger top league," said Livingston manager David Martindale.