Wade Elliott sealed a comeback win for Birmingham after keeper Colin Doyle's blunder had gifted Maribor the lead.
Jonathan Spector produced a poor back-pass which Doyle missed completely as he tried to kick clear, allowing Dalibor Volas an easy tap-in.
Birmingham levelled when Marlon King's reverse pass sent in Chris Burke and he cut in from the right before finishing.
Elliott scored with a 25-yard strike as goalkeeper Jasmin Handanovic allowed the ball to squirm beyond him.
The match was a welcome distraction for Birmingham considering their poor start in the Championship this season.
Birmingham were forced to reshuffle their defence with injuries to captain Stephen Carr and Curtis Davies. King started up front alone as Nikola Zigic began on the bench.
Elliott was just behind the lone striker in a 4-4-1-1 formation that included Jean Beausejour on the left wing and Burke on the right.
Birmingham, playing in yellow, made a bright start as Beausejour crossed for King, who headed at goalkeeper Handanovic.
But Maribor improved and Marcos Tavares controlled well with his chest then shot wide in the 13th minute. Tavares then turned provider, crossing for the lively Goran Cvijanovic, whose close-range header was turned wide for a corner by Doyle.
The visitors then regained the initiative. Keith Fahey shot over from 20 yards, after Maribor failed to clear a Burke cross, and King curled wide from a similar distance.
Birmingham were stunned though when Doyle's nightmare moment arrived. Spector deserved blame for his sloppy back-pass, from 30 yards out, that put Doyle under pressure with Volas charging at him.
But the keeper could not blame anyone for his dismal failure to connect with the ball, allowing Volas to tap in unopposed.
Maribor were on top for the rest of the first half with Tavares drilling another shot wide, but Burke's volley from the edge of the box forced Handanovic into a save at the other end.
Early in the second period, an excellent long-range strike from Ales Mertelj was pushed over by Doyle. Burke then had a volley blocked as Birmingham looked to fight back.
Doyle had another nervous moment after an hour, missing an attempted punch from Martin Milec's free-kick but his blushes were spared as a whistle for offside halted play.
But Birmingham were quickly level as King fed Burke, who finished impressively to equalise. That goal led to Zigic's introduction from the bench and Chris Hughton's team continued to look dangerous with the tall Serbian striker heading over a Burke cross.
Dominant Birmingham then squandered an excellent opening as Elliott's eight-yard shot was blocked by Handanovic. Elliott made amends in the 80th minute with his goal, snatching a deserved lead that they protected well.
Birmingham manager Chris Hughton: "I was very frustrated with the goal we conceded. In defence of Colin, it was a very difficult ball for him to deal with.
"It was then important we didn't concede again and we managed that and then went on to get a grip on the game. We showed great character and team spirit and, in the end, I thought we were worthy winners.
"I would think Colin and Jonathan might offer to buy Chris and Wade a drink now!"
Maribor coach Darko Milanic: "In the first half I thought we were the better team and we played an excellent game. We had everything under control at that stage but knew our opponents were very dangerous.
"In the second half though we were not as clever on the ball and Birmingham were more dangerous. They capitalised on our mistakes and scored and, after that, we didn't keep it together.
"Birmingham showed the spirit I expected them to show. The result just shows the quality in the group."