ST Mirren made it two wins from two in the Betfred Cup as Jack Baird scored with the last kick of the game to down Ayr United at the Paisley 2021 Stadium on Tuesday night.

The 1-0 win puts Alex Rae’s side in pole position to qualify from group G ahead of Saturday’s trip to Premiership side Hamilton Accies.

It had looked like the game was heading for a draw and a penalty shootout when Stevie Mallan saw his penalty saved by Greg Fleming in the 74th minute. But Baird was on hand to scramble home after a corner deep into injury time.

Inside five minutes St Mirren had a major scare. Jason Naismith’s back pass to Jamie Langfield was woefully short and Craig Moore latched onto it, clean through on goal he looked set to open the scoring but he delayed and allowed Baird the chance to block and the Buddies defender duly delivered with a timely intervention.

Seventeen had passed before the Buddies first threatened goal. Stevie Mallan’s free kick found John Sutton at the back post, the big striker nodded the ball back across goal but Jamie Adams was underneath it to clear.

Sutton went close minutes later when David Clarkson met a Mallan corner, he diverted it goalwards but his strike partner couldn’t stretch far enough to put it in and the ball went wide.

As the first half wore on neither side was able to gain any real control of the game. Saints’ main chances were coming from Mallan’s set-piece delivery. After 41 minutes Naismith got his head to a corner kick but his marker did enough to put him off and the ball flew over.

On the hour mark Lewis Morgan showed great skill to pass his man and get to the byline, his cross broke to Calum Gallagher and the wide man’s strike at goal was blocked by Fleming in the Ayr goal. Morgan was giving Ayr defenders, particularly right back Nicky Devlin a torrid time.

It was Gallagher’s last action of the game as he and John Sutton made way for Saints’ new signings Tom Walsh and Lawrence Shankland. Walsh was making his Buddies debut while Shankland returns for a second spell in Paisley on loan from Aberdeen.

Shankland had a chance to mark his debut in the perfect fashion. His clever movement at a Mallan corner was rewarded with a yard of space at the near post but he couldn’t keep his header down.

However minutes later Saints would pass up the chance of the game from 12 yards.

In the 74th minute Morgan burst down the left wing tempting three Aye defenders into a challenge as he cut inside and into the box, Nicky Devlin was lured into a tackle but he couldn’t get the ball and brought Morgan down, referee John Beaton pointed to the spot.

Mallan and Clarkson both showed interest but Mallan emerged with the ball. His penalty was well struck but at a good height for Fleming. Nevertheless it was a great one handed save to the goalkeeper’s right.

Soon after The Somerset Park side had their own chance to go in front. A misjudged jumped by Naismith allowed the ball to loop over him and through to Paddy Boyle who had acres of space but skewed his volley wide of the target.

As the match edged towards penalties Morgan continued to be the start of the show. He went past Ayr defenders at will and was a constant threat on the left wing. Rae will hope it is a sign of things to come from the youngster.

Walsh was next to try his luck on the wing. After latching on to Shankland’s ball he stood up an inviting cross to the back post but Clarkson couldn’t make contact for what would’ve been a certain goal.

Just when it looked like the match would go to penalties Saints got the winner with the last kick of the game.

Mallan’s corner was flicked on by Webster, the ball broke in the goalmouth and after a scramble Jack Baird was able to get a toe to the ball to give The Buddies all three points.

St Mirren: Langfield, Naismith, Webster, Baird, Irvine, Gallagher (Walsh, 61), Mallan, Hutton, Morgan, Clarkson, Sutton (Shankland, 61).

Subs not used: Gallacher, Gordon, Mackenzie, McAllister, Stewart.

Ayr: Fleming, Devlin, Boyle, Crawford, Cairney, Donald (McGuffie, 71), Adams (Gilmour, 45), Meggatt, Docherty, Murphy, Moore.

Subs not used:Hart, Wardrope, McCracken, Johnstone.