Queen of the South fought back to lead Falkirk at the midway stage of the Premiership play-off quarter-final.
The Bairns took a deserved lead when Blair Alston's low, driven shot whistled into the net.
Bob McHugh headed home Andy Dowie's cross to level the match after the break.
And a fine late strike by McHugh gave the Palmerston side an advantage to take into Saturday's return leg at the Falkirk Stadium.
The eventual winner will face Hamilton Academical in next week's two-legged semi-final.
Falkirk dominated the opening stages and Alston struck a fine shot past Zander Clark in the eighth minute.
Alston almost scored again when his 20-yard effort flew just past the post and team-mate David McCracken should have done better than plant a free header just before the break.
Queens knew they needed to improve in the second half and on-loan Motherwell forward McHugh got on the end of Dowie's cross to equalise.
The hosts began to take control and were rewarded for their second-half performance when McHugh fired home from Daniel Carmichael's pass in the final minute.
This was a rip roaring match with no time for finesse and Queens came back well to disrupt Falkirk in the second half. A great team effort but the job is only half done and the great news is that Paton will be fit for the return match at Falkirk on Saturday.
Queen of South: Clark, Mitchell, Durnan, Dowie, Holt, Burns, Kerr, McShane (Young 87), Russell (Kidd 90), Lyle (Carmichael 82), McHugh. Subs Not Used: Kevin Dzierzawski, Hooper, Atkinson, Higgins.
Goals: McHugh 56, 90.
Falkirk: McGovern, Vaulks, McCracken (Dick 76), Flynn, Kingsley, Alston, Millar, Sibbald, McGrandles, Beck, Shepherd (Bia Bi 83). Subs Not Used: Durojaiye, Bowman, Small, Leahy, Blair.
Goals: Alston 8.
Ref: John McKendrick
Images courtesy of www.qosfc.com/Sandy Robertson