Jacques Maghoma and Omar Bogle were on target as Birmingham completed the double over Stoke with a 2-0 victory at St Andrew's.
It was the Potters' first defeat in 11 since they were beaten 1-0 by the Blues at the bet365 Stadium in October.
The victory sees Birmingham climb into seventh place, two points adrift of the final play-off place, while the Potters are a further three points behind in 11th.
Ramallo Jota almost gave the hosts an early lead as he won possession with Stoke pair Bruno Martins Indi and James McLean in a tangle but his low cross-shot drifted wide of the far post.
With Joe Allen struggling to make an early impact it was McLean who tried to give the visitors a spark and his instinctive shot had Lee Camp scrambling to his right to save at the near post.
At the other end, there was an even better save by former Birmingham goalkeeper Jack Butland as he kept out a Lukas Jutkiewicz header at full stretch.
Butland denied Jutkiewicz again when he tipped another header from Jacques Maghoma's free-kick over the bar.
Birmingham always looked dangerous on the break and Harlee Dean put Che Adams through but the Blues frontman smashed his shot into the side netting.
Stoke's best opportunity fell to Sam Clucas after Saido Berahino's initial shot was blocked by Camp but from the rebound the former Swansea midfielder screwed his left-footed shot wide of a gaping goal.
Camp then kept out a Tom Ince effort but in Birmingham's next attack Butland was left with no chance when Maghoma collected a loose ball after Ryan Woods had lost possession and let fly with a 25-yard strike into the roof of the net two minutes before the break.
The goal sparked Stoke to life, who introduced Peter Crouch and Benik Afobe after an hour's play.
Maghoma was always a threat as Stoke pushed forward and he forced another excellent save from the impressive Butland.
Bogle then wrapped up victory three minutes from time with a long-range effort to record his first goal for the club.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport Staff');
ga('pacontentapi.set', 'dimension2', 'ec3942fc-efb4-44ca-ae20-fabce748684c');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:club-news,paservice:sport:football,paservice:sport:match-reports');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Birmingham close in on play-offs after ending Stoke\u2019s unbeaten run'});