A hugely deflected effort from Hugo Viana confirmed SC Braga's place in the round of 32 and left Birmingham City FC hoping for a favour from their opponents on UEFA Europa League matchday six.
The outcome might have been different had Blues striker Nikola Žigić not had a first-half penalty saved by Quim. In the end, though, Viana's 51st-minute strike, which went in via Curtis Davies, means the English side must defeat eliminated NK Maribor when Group H concludes on 15 December and keep their fingers crossed that Braga overcome Club Brugge KV in Belgium.
The visitors should have taken the lead after 11 minutes, when Ewerton pulled down Wade Elliot, but Žigić's penalty was comfortably kept out by Quim. David Murphy also had a free-kick well saved in a positive start from Chris Hughton's men, before Chris Burke beat Ewerton and squared to Keith Fahey, who shot straight at Quim.
As the game progressed, last season's runners-up gradually found their rhythm, however. Alan found space on the right but was unable to find a team-mate with a dangerous cross, while Leandro Salino might have done better than place his cross too close to Boaz Myhill after beating two defenders.
Viana knocked the wind out of the visitors' sails, though, with a strike which Davies was desperately trying to block. The Arsenalistas will progress as section winners by beating Club Brugge next month.