text: It was a scrappy effort, which saved the game from going to what had seemed an inevitable penalty shootout.
  Stevie Mallan though had earlier missed the game's best chance for the home side when he failed to score from the penalty spot.
  St Mirren now lead Group G by three points.
  It might have been picture postcard weather for the first half in Paisley, but there wasn't much to write home about.
  St Mirren were too predictable with long balls floated forward for John Sutton and David Clarkson up front, although Mallan's dead ball delivery was, as always, a threat.
  Ayr started well enough and Paul Cairney had a real early chance, but after that Saints looked comfortable at the back.
  St Mirren's best chance of the half fell for Calum Gallacher who got on to the end of a lovely ball from Clarkson.
  It was screaming for the first-time volley, but he chose the wrong option in taking a touch and the opportunity melted in the evening sun.
  Things, we hoped, could only get better in the second half.
  They did. A bit.
  Lewis Morgan was highly impressive down the left side for the home team, embracing the concept of dazzling wing play and hitting the by-line before delivering the cross. But no-one could cash in.
  He won his team a penalty with another dazzling run. The usually deadly Mallan took the spot kick, but United goalkeeper Greg Fleming produced a wonderful save to his right hand side to urge the game toward further penalties after 90 minutes.
  But then central defender Baird chipped in with his last-minute effort, bundling the ball over the line after a scramble in the box.
  Enough to set Saints proudly at the top of their section.
  St Mirren manager Alex Rae: "We struggled to get any intensity in the first half. I'm conscious of the fact it was really warm out there tonight.
  "A lot of the boys are just not up to speed. This competition has come really early.
  "Lewis Morgan tonight was sensational, driving at people. The boy is making a really big impact.
  "I spoke to Stewart (Gilmour, the chairman) before the game, there may be funds for a loan deal, but we'll try and squeeze a few quid out of him."
  Ayr United manager Ian McCall: "I thought it was a really poor game of football. We're a mile short in terms of bodies and fitness but a draw would have been fair. To lose one so late is hard to take.
  "But, we've got two games left and if we win them two you never know.
  "We need strikers. We need a wide player. We need a centre back. We're four or five short of where we want to be. The substitutes Alex (Rae) was able to make was the difference."
  Match ends, St. Mirren 1, Ayr United 0.
  Second Half ends, St. Mirren 1, Ayr United 0.
  Goal!  St. Mirren 1, Ayr United 0. Jack Baird (St. Mirren) right footed shot from the centre of the box to the bottom left corner following a corner.
  Corner,  St. Mirren. Conceded by Patrick Boyle.
  Attempt blocked. Lewis Morgan (St. Mirren) right footed shot from outside the box is blocked.
  Attempt missed. David Clarkson (St. Mirren) left footed shot from the left side of the six yard box is close, but misses to the left.
  Corner,  Ayr United. Conceded by Jason Naismith.
  Foul by Lewis Morgan (St. Mirren).
  Nicky Devlin (Ayr United) wins a free kick in the defensive half.
  Attempt missed. David Clarkson (St. Mirren) right footed shot from the centre of the box is high and wide to the left.
  Corner,  St. Mirren. Conceded by Ross Docherty.
  Lewis Morgan (St. Mirren) wins a free kick in the defensive half.
  Foul by Nicky Devlin (Ayr United).
  Foul by Kyle Hutton (St. Mirren).
  Ross Docherty (Ayr United) wins a free kick in the defensive half.
  Foul by Lawrence Shankland (St. Mirren).
  Paul Cairney (Ayr United) wins a free kick in the attacking half.
  Attempt missed. Patrick Boyle (Ayr United) left footed shot from the left side of the box is close, but misses to the left.
  David Clarkson (St. Mirren) is shown the yellow card for a bad foul.
  Foul by David Clarkson (St. Mirren).
  Patrick Boyle (Ayr United) wins a free kick on the right wing.
  Nicky Devlin (Ayr United) wins a free kick in the attacking half.
  Foul by David Clarkson (St. Mirren).
  Corner,  St. Mirren. Conceded by Greg Fleming.
  Penalty saved! Stephen Mallan (St. Mirren) fails to capitalise on this great opportunity,  right footed shot saved  in the bottom left corner.
  Penalty St. Mirren. Lewis Morgan draws a foul in the penalty area.
  Penalty conceded by Nicky Devlin (Ayr United) after a foul in the penalty area.
  Foul by Kyle Hutton (St. Mirren).
  Paul Cairney (Ayr United) wins a free kick in the attacking half.
  Attempt missed. Lawrence Shankland (St. Mirren) header from the centre of the box is too high following a corner.
  Corner,  St. Mirren. Conceded by Paul Cairney.
  Substitution, Ayr United. Craig McGuffie replaces Michael Donald.
  Ross Docherty (Ayr United) is shown the yellow card.
  Stephen Mallan (St. Mirren) wins a free kick in the defensive half.
  Foul by Paul Cairney (Ayr United).
  Foul by Tom Walsh (St. Mirren).
  Michael Donald (Ayr United) wins a free kick on the right wing.
  Attempt saved. Stephen Mallan (St. Mirren) right footed shot from outside the box is saved in the top centre of the goal.
  Substitution, St. Mirren. Tom Walsh replaces Calum Gallagher.
  Substitution, St. Mirren. Lawrence Shankland replaces John Sutton.
target: Jack Baird scored a dramatic last-minute goal to preserve St Mirren's 100% record in this season's Betfred League Cup.