Billy Mehmet claimed a hat-trick as St Mirren saw off stuffy Alloa to secure progress in the Scottish Cup.
The striker's 27th-minute header smacked the inside of the post and rolled across the line after bouncing off goalkeeper David Crawford.
The Wasps were level soon after when Mark Brown cracked in a volley.
Saints reclaimed the lead on half-time when Craig Dargo set up Mehmet to lash home from 18 yards and the forward coolly rounded Crawford late on.
The Second Division side were in the game right up until Mehmet completed his hat-trick on 87 minutes and were first to threaten on a bitterly cold afternoon in Paisley.
Allan Maitland's men carved out a couple of decent chances when Andy Scott's corner picked out Chris Townsley at the back post but his header was hooked to safety by the Saints defence.
John Grant then unleashed a long-range effort which appeared to be heading for the top corner but Buddies keeper Paul Gallacher did well to gather.
As the home side found their rhythm, only last-gasp defending prevented Alloa from falling behind when Scott blocked on the line with his shoulder to prevent Stephen McGinn's shot finding the net.
St Mirren then needed a bit of fortune to open the scoring when a Jack Ross cross from the right found Mehmet 10 yards out and he bulleted a header towards goal, which struck the inside of the post and only crossed the line after hitting the goalkeeper.
The Wasps responded with a fine goal on 34 minutes when Brown connected with Mark Gilhaney's cross and rifled a right-foot volley into the back of the net.
Saints were back in front in the closing moments of the first half when Dargo delivered an inviting cross for Mehmet to smash home from just inside the penalty box.
Alloa were busy after the interval and Gilhaney dispatched a powerful effort that was blocked by Gallacher a few minutes into the second half.
Gus MacPherson's men could have killed off the tie when Steven Robb embarked on a good run before finding Mehmet out on the left. The forward cut inside before having a shot at goal but his effort was blocked by the Alloa defence.
With the Wasps still buzzing away, Gallacher was later called into action again, smothering a low, angled drive from Scott.
Mehmet had the final say with just three minutes to go when he met a Hugh Murray ball and rounded the goalkeeper to slot home.
The in-form striker was denied a fourth goal when he forced a great save from Crawford in the final seconds.
St Mirren striker Billy Mehmet: "We knew it was going to be a tough tie today and that Alloa would come here fancying their chances.
"But we put in a good performance and the main thing was to get through to the next round.
"We've done that and we're happy with it.
"I'm definitely claiming the hat-trick, I'll have to watch that first goal on television.
"The boys are slaughtering me, saying I only scored a double."
Alloa manager Allan Maitland: "I thought Billy Mehmet was excellent last week against Kilmarnock and was the best player on the park and was again today.
"He took his three goals really well, particularly the second one.
"Our players acquitted themselves really well.
"We came here to play and try to frustrate St Mirren for as long as possible."
Alloa: Crawford, McClune, Walker, Brown (Carroll 72), Grant, Buist , Brown Ferguson, Townsley, Gilhaney (Carrigan 76), Noble (Kerr 83), Agnew. Subs Not Used: Hall, McCafferty.
Goals: Brown 34.
Referee: Stephen Finnie
Live text and stats
Saturday, 9 January 2010
Crawford (og) 27
08 Dorman (Murray 70)
41 Johnston (Barron 75)
18 Dargo (Higdon 82)
06 Brown (Carroll 72)
07 Gilhaney (Carrigan 76)
09 Noble (Kerr 83)
Ref: FinnieAtt: 2,587
Attempts on target
Attempts off target
90:00+3:17 The referee brings the game to a close.
90:00+3:06 Steven Robb produces a cross, clearance made by Scot Buist.
90:00+2:30 Stephen McGinn concedes a free kick for a foul on Scott Agnew. Direct free kick taken by Scott Agnew.
90:00+0:24 Foul by Billy Mehmet on Chris Townsley, free kick awarded. Free kick taken by David Crawford.
89:22 Billy Mehmet takes a shot. David Crawford makes a save. Corner taken by Steven Robb from the left by-line.
86:40 The assist for the goal came from Hugh Murray.
86:40 GOAL - Billy Mehmet:St Mirren 3 - 1 Alloa Goal scored by Billy Mehmet from the edge of the area to the bottom right corner of the goal. St Mirren 3-1 Alloa.
84:27 Michael Higdon takes a shot. David Crawford makes a save. Steven Robb takes a inswinging corner from the right by-line played
to the near post.
81:59 Substitution Hugh Kerr comes on in place of Stuart Noble.
81:59 Substitution Michael Higdon comes on in place of Craig Dargo.
81:43 Jack Ross produces a cross, Header on goal by Craig Dargo from just inside the area goes over the goal.
80:16 Billy Mehmet takes a shot. Blocked by Scot Buist.
79:56 The ball is swung over by Scott Agnew.
78:36 Free kick awarded for a foul by Brian Carrigan on Steven Robb. Steven Robb crosses the ball from the free kick left-footed
from left channel, Brown Ferguson makes a clearance.
77:56 Corner taken left-footed by Steven Robb from the left by-line, Scott Walker makes a clearance.
77:04 Brian Carrigan gives away a free kick for an unfair challenge on David Barron. Lee Mair takes the free kick.
76:32 The ball is delivered by Scott Agnew.
75:08 Substitution Brian Carrigan on for Mark Gilhaney.
74:17 Substitution David Barron is brought on as a substitute for Allan Johnston.
73:30 The ball is sent over by Craig Dargo, clearance made by Chris Townsley.
71:31 Substitution Gary Carroll replaces Mark Brown.
70:39 The ball is crossed by Allan Johnston, Scott Walker makes a clearance.
69:26 Substitution (St Mirren) makes a substitution, with Hugh Murray coming on for Andy Dorman.
68:43 Inswinging corner taken from the right by-line by Andy Dorman, clearance made by Mark Brown.
66:47 Stuart Noble is caught offside. Paul Gallacher takes the free kick.
Correction - 63:57 Free kick awarded for a foul by Steven Robb on Mark Brown. Direct free kick taken by Scott Walker.
63:57 Steven Robb challenges Mark Brown unfairly and gives away a free kick. Direct free kick taken by David Crawford.
63:32 Short corner taken by Andy Dorman.
61:41 Jack Ross sends in a cross.
59:16 Brown Ferguson challenges Steven Robb unfairly and gives away a free kick. Andy Dorman crosses the ball in from the free kick,
Brown Ferguson makes a clearance.
58:20 Stephen McGinn concedes a free kick for a foul on David McClune. The free kick is delivered right-footed by Chris Townsley
from right channel, save by Paul Gallacher.
57:47 Jack Ross delivers the ball, save made by David Crawford.
56:56 Andy Dorman takes the inswinging corner, Headed effort from deep inside the penalty area by Lee Mair goes harmlessly over
56:47 The ball is sent over by Andy Dorman, David McClune manages to make a clearance.
55:19 Inswinging corner taken by Scott Agnew from the left by-line, Billy Mehmet fouled by Scott Walker, the ref awards a free kick.
Direct free kick taken by Paul Gallacher.
52:43 Free kick awarded for an unfair challenge on Mark Gilhaney by Lee Mair. Free kick crossed right-footed by Scott Agnew, clearance
by Stephen McGinn. Short corner taken by Mark Gilhaney from the left by-line.
52:20 Billy Mehmet takes a shot. David Crawford makes a save.
48:53 Scot Buist gives away a free kick for an unfair challenge on Billy Mehmet. Direct free kick taken by Stephen McGinn.
47:14 Centre by Craig Dargo, Billy Mehmet produces a right-footed shot from deep inside the penalty box which goes wide of the
46:38 Mark Gilhaney takes a shot. Paul Gallacher makes a save.
45:31 John Grant fouled by Jack Ross, the ref awards a free kick. Free kick crossed right-footed by Scott Agnew from left channel.
45:01 The referee gets the second half started.
45:00+1:45 The match has reached half-time.
45:00+0:45 Assist by Craig Dargo.
45:00+0:45 GOAL - Billy Mehmet:St Mirren 2 - 1 Alloa Billy Mehmet scores a goal from the edge of the area to the bottom right corner of the goal. St Mirren 2-1 Alloa.
45:00+0:04 A cross is delivered by Jack Ross, Chris Townsley makes a clearance.
41:08 The ball is sent over by Brown Ferguson.
40:36 The ball is crossed by Andy Dorman, clearance made by Chris Townsley.
37:27 Brown Ferguson sends in a cross, clearance by Lee Mair.
36:22 Craig Dargo concedes a free kick for a foul on Mark Gilhaney. Free kick crossed right-footed by Scott Agnew from right channel,
save by Paul Gallacher.
Correction - 35:23 The offside flag is raised against Craig Dargo. David Crawford restarts play with the free kick.
35:23 The assistant referee signals for offside against Craig Dargo. Indirect free kick taken by David Crawford.
33:11 Mark Gilhaney provided the assist for the goal.
33:11 GOAL - Mark Brown:St Mirren 1 - 1 Alloa Mark Brown scores a goal from close in low into the middle of the goal. St Mirren 1-1 Alloa.
32:13 Craig Dargo challenges Mark Brown unfairly and gives away a free kick. Scot Buist restarts play with the free kick.
29:26 Jack Ross concedes a free kick for a foul on Mark Gilhaney. Free kick taken by Scott Walker.
26:45 GOAL - David Crawford:St Mirren 1 - 0 Alloa An unfortunate own goal is conceded by David Crawford. St Mirren 1-0 Alloa.
Correction - 26:00 Header from the edge of the area by Billy Mehmet hits the post.
26:00 Billy Mehmet takes a shot.
24:16 Chris Townsley fouled by Billy Mehmet, the ref awards a free kick. Direct free kick taken by Chris Townsley.
23:22 Billy Mehmet produces a right-footed shot from just outside the area that goes wide left of the goal.
21:27 The ball is crossed by Steven Robb.
19:39 The official flags Craig Dargo offside. Indirect free kick taken by Scot Buist.
18:13 Steven Robb concedes a free kick for a foul on Scott Agnew. Free kick taken by David McClune.
16:57 Unfair challenge on Mark Gilhaney by Jack Ross results in a free kick. Scott Walker restarts play with the free kick.
15:46 Stuart Noble is ruled offside. Indirect free kick taken by Paul Gallacher.
13:33 Andy Dorman takes a inswinging corner from the right by-line to the near post, clearance by Chris Townsley. Billy Mehmet takes
a shot. Blocked by Scot Buist.
13:17 Andy Dorman delivers the ball, Mark Brown makes a clearance.
12:43 Steven Robb sends in a cross.
8:47 John Grant takes a shot. Save by Paul Gallacher.
8:20 Mark Gilhaney fouled by Chris Innes, the ref awards a free kick. Mark Gilhaney takes the direct free kick.
7:21 The referee blows for offside. Chris Townsley takes the indirect free kick.
6:43 Allan Johnston produces a right-footed shot from just outside the penalty box that misses to the left of the goal.
6:10 Centre by David McClune, Chris Innes makes a clearance.
5:03 Stephen McGinn challenges Scott Agnew unfairly and gives away a free kick. Free kick crossed by Scott Agnew, clearance made
by Stephen McGinn.
4:05 Effort on goal by Allan Johnston from outside the area goes harmlessly over the bar.
2:27 The ball is swung over by Billy Mehmet, clearance by Mark Brown.
2:02 Free kick awarded for an unfair challenge on Steven Robb by Mark Brown. Free kick taken by Stephen McGinn.
0:00 The game gets underway.
Live text and data provided by The Press Association.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.