Connor Shields struck twice for Queens.
Hearts' nine-game unbeaten run in the Scottish Championship came to an end as the runaway leaders lost 3-2 against Queen of the South at Tynecastle.
Connor Shields wasted little time in opening the scoring for Queens, after Stephen Dobbie picked off a stray Mihai Popescu pass and slid in the forward.
Shields then doubled his tally midway through the first half with a delightful chip which beat Hearts goalkeeper Ross Stewart from 25 yards.
The hosts pulled a goal back after 34 minutes when Popescu made up for his earlier error to head home Andy Halliday's corner.
Hearts upped the pressure after half-time and grabbed an equaliser in the 72nd minute when Armand Gnanduillet converted Euan Henderson's cross from the right.
Queen of the South had the last laugh, though, when the impressive Shields saw a cross put into his own net by Andy Irving with eight minutes left.