Elliot Frear's late winner enough to secure top spot for Motherwell

Motherwell's Elliott Frear
Motherwell's Elliott Frear, right, secured victory with an 89th-minute winner against Edinburgh City

Motherwell secured progress to the knockout stages of the Scottish League Cup by defeating Edinburgh City 2-1 to finish top of Group F.

The visitors had to come from behind at Ainslie Park after Ashley Grimes put Edinburgh City in front.

The lead lasted only five minutes before Chris Cadden equalised and Elliott Frear scored a late winner.

Motherwell's win moved them two points clear of Queen's Park, who have played all their group games.

Stephen Robinson's side have been in impressive form, winning all three fixtures so far, scoring 11 goals and conceding only two.

Queen's Park did all they could to keep the top spot within reach, eventually seeing off a dogged Berwick Rangers 3-2.

Greg Rutherford opened the scoring for Berwick in the first minute, but Queen's equalised eight minutes later through Ross Millen. By half-time, they were 3-1 in front thanks to Anton Brady and David Galt, although Berwick did pull a goal back in the second half through Steven Thomson.

Ayr United manager Ian McCall
Ian McCall's Ayr United will finish top of Group E if they equal or better Kilmarnock's result on Saturday

In Group E, Ayr United climbed above local rivals Kilmarnock to the top after a comprehensive 5-1 defeat of Clyde.

The visitors opened the scoring at Somerset Park through David Goodwillie, but were then swept aside.

Robbie Crawford and Craig Moore put Ayr in front before half time, then Moore, Michael Moffat and Declan McDaid completed the scoring.

The victory leaves Ayr three points clear of Kilmarnock, with both having one game left.

Ian McCall's Ayr side retained their 100% record in Group E and can seal progress to the knockout stages if they equal or better Kilmarnock's result at the weekend. Ayr are away to Annan Athletic and Kilmarnock are at home to Dumbarton.

The Ayrshire rivals will be confident of winning, since Dumbarton and Annan have yet to secure a victory in the competition following their 0-0 draw. Annan secured the bonus point by winning the penalty shoot-out 4-3 to leave Dumbarton bottom of the group.