Ayr United lifted themselves off the bottom of the First Division table thanks to a late Mark Roberts goal.
Spurred on by Wednesday's League Cup win against Hearts, Ayr had the best of the opening stages.
Ayr continued to dominate after the break, but found Queen of the South keeper Lee robinson in excellent form.
But, with seven minutes remaining, Roberts latched onto James McKernan's through ball and calmly slotted home to secure the win.
Ayr United: Cuthbert, Tiffoney, Malone, Smith, Ross Robertson, Geggan, McGowan (Paterson 76), McKernan, Moffat (Connolly 79), Roberts, Trouten. Subs Not Used: Burke, Armstrong, McWilliams.
Booked: Roberts. Goals: Roberts 84.
Queen of the South: Robinson, Craig Reid, Higgins, Simmons, Campbell, McGuffie, Johnston (Clark 62), McKenna, Brighton (Holt 70), Carmichael (Smylie 76), McLaughlin. Subs Not Used: McKenzie, Black.
Ref: Calum Murray