Birmingham's progress in the Europa League this season will go down to the final fixture after they lost 1-0 in Braga tonight.
Former Newcastle United midfielder Hugo Viana scored the game's solitary goal as the Portuguese side all but secured qualification to the knockout stages.
Chris Hughton's side started well and had much the better of the opening exchanges, with Jean Beausejour and Steven Caldwell wasting good headed chances.
Scotland international Chris Burke was convinced that the Blues should have had an early penalty, but his appeals were waved away by the referee.
The visitors were awarded a spot kick shortly afterwards when Burke was fouled by Braga defender Ewerton, but striker Nikola Zigic missed from 12 yards.
The Brazilian was then lucky to stay on the pitch when the official opted not to show him a second yellow card for a foul on Burke.
Last year's losing finalists then got control of the game but despite having the majority of the possession, failed to test Boaz Myhill in the first half.
Ex-Magpies man Viana then gave Braga the lead, albeit in fortunate circumstances, as his shot from the edge of the area was deflected in off Curtis Davies.
The home side had chances to secure the points but Myhill kept Birmingham in the game with a fine late save from Alan.
The Blues could not find an equaliser meaning they need to beat NK Mariboor at St Andrews next week and hope Braga beat Club Brugge in order for them to progress.