Ross County are out of the Betfred League Cup just four months on from lifting the trophy after defeat by Alloa at the Indodrill Stadium.
League One hosts Alloa were ahead inside 11 minutes through strikes from Jordan Kirkpatrick and Jon Robertson.
The holders responded and were level just 10 minutes later through cup final hero Alex Schalk, and Brian Graham.
But Calum Waters made it 3-2 to ensure Jim McIntyre’s Premiership side cannot qualify from Group D.
They still have a final home game against Cove Rangers, but are four points adrift of second-placed Raith Rovers, who host group leaders Alloa on Saturday.
Heavy rain before kick-off made conditions on the newly laid artificial surface difficult, and it was the home side who adjusted better.
Greig Spence teed up Kirkpatrick who fired low past County goalkeeper Scott Fox.
Then Iain Flannigan set up Robertson to slot the ball home for the second.
Michael Gardyne left Graham with the easiest of tap-ins from an inch-perfect cross to start the recovery.
Schalk, who scored County’s winning goal in the cup final against Hibernian last season, powered home past Neil Parry to make it all square.
Gardyne then hit the crossbar but the hosts always looked more likely to find the winner and Waters obliged with 18 minutes left.
Ross County manager Jim McIntyre: “The referee has made the worst decision of the night [Jason Marr’s challenge on Alex Schalk with the score at 3-2]. It’s a stonewall penalty on Alex Schalk. I have looked at it several times.
“It was a poor, poor decision at a crucial time in the match where I thought we had the ascendency and looked as if we were pressing for the third goal. It was a big moment in the match.
“The performance was embarrassing. We played right into their hands by making gilt-edged mistakes.
“We were nowhere near good enough. I can only apologise to our fans who made the journey down tonight.”