Queen of the South twice pegged back St Mirren to ensure their Scottish Cup fourth round tie goes to a replay.
On-loan Newcastle midfielder Conor Newton half-volleyed the Buddies in front, but home pressure paid off when Iain Russell equalised.
St Mirren regained the lead when Steven Thompson finished a flowing move.
Michael Paton's cool finish brought the Doonhamers level again to stop Saints getting revenge for a Scottish League Cup exit at Palmerston in August.
It was an altogether more confident St Mirren side arriving in Dumfries this time, but Danny Lennon's men failed to close out a game they twice led in.
Therefore Jim McIntyre's Queen of the South will have a chance to make it a League Cup and Scottish Cup double over Saints in a Paisley replay.
Queens' Gavin Reilly had reason to feel luck was not on his side early on.
After pressuring Marc McAusland into a slip, Reilly was aggrieved when referee Kevin Clancy failed to spot the ball touching former Doonhamers defender's hand.
Steven Thompson's sixth goal of the season had given St Mirren a 2-1 lead
It got worse for the hosts when St Mirren's opener took an unfortunate nick off Russell on its way into Zander Clark's net.
Newton showed great technique to half-volley home from the corner of the box following a headed half-clearance by Queen of the South's Kevin Holt.
However, the hosts responded well to that early blow, with Holt, Michael Paton and Russell all testing Saints' goalkeeper Marian Kello.
But after making string of three competent saves, the Slovakian fumbled for Queen of the South's equaliser.
Kello failed to collect a free-kick from the left and the ball fell to Iain Russell to fire in off the post via a deflection off Buddies' defender Darren McGregor.
St Mirren had a great chance to get back in front at the start of the second half.
Marc McAusland shouldered the ball towards goal from a corner but Zander Clark made a low save before Jason Naismith sliced the rebound wide.
The Buddies did notch their second when Thompson slid in for his sixth of the season. A clinical finish which came about thanks to brilliant link up down the left between John McGinn, Thomas Reilly and Sean Kelly.
Holt squandered a levelling opportunity for Queen of the South by taking a fresh-air swipe at the low cross when a goal seemed certain.
Next time there was no mistake, though.
A clever chipped cross from Derek Lyle preceded a perfect headed knock-down by Paul Burns, leaving a composed Paton to side-foot it high into the net.
Queens of the South manager Jim McIntyre
: "I thought my side were excellent. It was a difficult start losing the early goal and St Mirren had us rattled.
"But, after 20 minutes, we started to make some passes and looked a real threat.
"As for the replay, we've got a chance. It will be difficult again - they are a Premiership side - and we will need to be at our maximum once again, but that it what we will aim to do."
St Mirren manager Danny Lennon
: "Gowser picked up a knock in training but decided he couldn't go on after a quarter of an hour and asked to be subbed.
"We actually missed the wee man when he came off, but I have to respect his honesty as he put the team first.
"He would not have been his usual busy self if he had stayed on, but it was an important point in the match.
"I'm a wee bit disappointed that we got ourselves in front twice but didn't hold on to it for a prolonged period of time.
"That is all down to an energetic Queen of the South side.
"It was a proper cup tie. It wasn't great football played by either side, but both sets of fans were thoroughly entertained."
Queen of the South
- 01 Clark
- 02 Mitchell Booked
- 03 Holt
- 08 McShane
- 05 Durnan
- 06 Higgins
- 07 Burns
- 04 McKenna
- 09 Reilly (Lyle - 67' )
- 10 Paton
- 11 Russell Booked
- 12 Atkinson
- 14 Lyle
- 15 Carmichael
- 16 Dowie
- 17 Dzierzawski
- 18 McGuffie
- 19 Slattery
- 28 Kello
- 22 Naismith Booked
- 18 Kelly
- 06 Goodwin
- 04 McGregor
- 14 McAusland
- 24 Newton
- 11 McLean
- 09 Thompson
- 10 McGowan (Reilly - 21' )
- 07 McGinn Booked
- 02 van Zanten
- 05 Mair
- 08 Harkins
- 16 Caprice
- 17 Reilly
- 27 Grainger
- 30 Dilo
Ref: Kevin Clancy