Ten-man St Mirren held off a fightback by Ross County to secure a Scottish Cup quarter-final tie away to Hearts.
Gary Teale drilled the ball home on 14 minutes after Steven Thompson headed down a David Barron cross.
Thompson was sent off eight minutes before the break after elbowing Johnny Flynn in the face.
But Nigel Hasselbaink fired the Buddies' second after 53 minutes and County were unable to build on Sam Morrow's header three minutes later.
County manager Derek Adams made six changes for the replay after the First Division leaders drew with Raith Rovers on Saturday, deciding to rest some players with his main focus being promotion to the top-flight.
Joe Malin, Jonny Flynn, Russell Duncan, Michael Gardyne, Rocco Quinn and Morrow all came in from the sidelines, while St Mirren made only one change as Hasselbaink replaced the cup-tied Dougie Imrie.
Morrow could only glance a header wide after Mark Corcoran got behind the Scottish Premier League side's defence to deliver a dangerous cross within a minute.
A couple of shots from Hasselbaink suggested that the Dutchman was in the mood before the Paisley side took the lead when Teale fired the ball into the corner of the net from 20 yards.
Hasselbaink was not far away with a rasping shot that just cleared the crossbar after he shook off a couple of markers.
However, County were beginning to press for an equaliser by the time Thompson was shown a straight red card for violent conduct.
The Dingwall side were seeing more of the ball against the 10 men, but they were finding the Saints defence a hard nut to crack.
Saints threatened in the 50th minute, when a Teale cross was only partially cleared by Corcoran.
The ball fell for Jim Goodwin, who let fly at goal only for goalkeeper Malin to dive full length to his right to push the ball away.
St Mirren doubled their lead a couple of minutes later when Graham Carey cut in from the left and, instead of shooting himself, squared the ball for Hasselbaink to drill the ball past Malin at the far post.
County hit back when a Quinn free-kick from the left touchline was headed in off the underside of the crossbar and into the net by Morrow.
The goalscorer had another chance when a slack kick-out from Samson fell for Steven Craig, whose ball inside was scooped over the crossbar by the Irish striker.
Ross County manager Derek Adams: "We made six changes tonight to give some of our players a rest.
"We have an important league campaign to take care of and I was delighted with the players who came in and performed so well.
"Unfortunately, we didn't have enough to go through to the next round.
"We have eight games in 25 days, it's a lot of football. It's important we move on in our league campaign.
"I said before we didn't need a replay, but it was good the other players got a game tonight.
"They worked well and we were unfortunate to lose two, which from my point of view were bad, goals."
St Mirren manager Danny Lennon: "I thought from start to finish it was a very committed performance.
"We were up against it more when Steve Thompson was sent off, but the boys dug deep and it was a great win.
"We will look to take that type of performance into the next seven league games.
"This is a very difficult place to come. It was a challenge for us. They were on an 18-match unbeaten run and Celtic were the last team to beat them.
"They are a very good side and I'm sure the way Derek has got them playing they would be a very good addition to the SPL next season."