Newcastle United secured Champions League football for another season with a hard fought victory over Birmingham City at St. James' Park.
Hugo Viana's stunning 42nd minute free kick settled the game with Matthew Upson having been controversially sent off for a push on Craig Bellamy just outside the box.
There were few chances in the early stages but one of the better openings saw Christophe Dugarry head wide after Damien Johnson had got the better of Olivier Bernard in the 14th minute.
Two minutes later the Magpies had an even better chance when Bellamy latched on to a loose ball with only visiting goalkeeper Ian Bennett to beat.
The Wales striker attempted to end his goal drought by taking the ball round Bennett but the former United trainee was able to dive at Bellamy's feet and recover the ball.
In the 32nd minute Dugarry beat Jonathan Woodgate to cross from the left and Bernard forced a save out of his own goalkeeper Shay Given as he attempted to beat Damien Johnson to the ball.
In the 37th minute Bellamy's pace took him clear from Jermaine Jenas' ball over the top but the forward, on his wrong right foot, pulled his shot across Bennett's goal.
But it was not long before Newcastle got their breakthrough. Bellamy raced on to Nolberto Solano's throughball, and was pushed over by Upson, who was the last defender.
Referee David Elleray, in his last ever game, consulted his assistant before dismissing Upson and Viana curled the resulting 20 yard free-kick over the Blues' wall and into the net with his left foot.
Ten-man City found it tough going after the break with United launching several attacks but they grew stronger as the half wore on and Dugarry should have levelled after Bryan Hughes had rolled the ball across the six-yard line, but somehow he was not able to connect.
And in the 64th minute Kieron Dyer hit the post from close range after Viana had crossed from the left.
Newcastle almost made it two in the 69th minute when Shola Ameobi saw his header cleared off the line by Stephen Clemence.
Ineffective Robbie Savage was replaced by Stan Lazaridis in the 69th minute and seconds later Dyer saved Dugarry, booked earlier in the game, from being sent off when he quickly rose to his feet following a heavy challenge from the Blues player.