Steve Bruce's Birmingham, already assured of automatic promotion and who needed to win on the final day to finish top, squandered numerous chances before and after Whaley's 85th-minute winner.

Sunderland cruised to a 5-0 victory at Luton to snatch the title, but the win was too little too late for Preston, who had triumphed in just one of their previous seven matches at the start of the day to fall out of the top six.

North End had most of the possession and the better of the chances in a first half which saw both sides hit the woodwork, while both were guilty of several glaring second-half misses.

England striker David Nugent came close as he hit the post while Stephen Kelly produced a stunning tackle to deny Brett Ormerod after Chris Sedgwick's shot had been parried by Colin Doyle.

At the other end, Birmingham hit the crossbar through Sebastian Larsson after Liam Chilvers had blocked Andrew Cole's effort.

It was a blistering start from the hosts, mindful of their need for the points.

They almost edged ahead in the fifth minute when Danny Pugh sent over a cross from the right wing and, when the ball broke, Whaley fired in a right-footed shot which came back off a post.

Sedgwick had his volley blocked well by Clemence as the pressure continued and Nugent forced a save out of Doyle in the Birmingham goal.

Sean St Ledger was booked in the 29th minute for a foul on Niklas Bendtner but Radhi Jaidi could do no better than head wide from Larsson's free-kick.

Birmingham continued to look for the goal which would put them on their way to an important victory but the free-scoring Gary McSheffrey was caught offside by a tight North End back line, while Doyle was quick to catch a Pugh cross at the other end.

Larsson went even closer in the 35th minute, hitting the crossbar from six yards after good pressure from Cole but there was still no end to the stalemate as the sides went in to the interval.

Callum Davidson and Matthew Hill both flashed shots from 20 yards wide after the restart and Graham Alexander twice went close, firing wide and then forcing Doyle to save.

Doyle then held Whaley's drilled effort from outside the area, while Pugh was next to test the Birmingham goalkeeper from distance.

But Preston were given a let off when McSheffrey headed wide from Larsson's fine cross and Clemence saw his shot blocked by St Ledger as Birmingham threatend at the other end.

The visitors finished strongly and Preston goalkeeper Wayne Henderson made smart saves to deny Campbell and Cameron Jerome in quick succession.

Patrick Agyemang headed Lewis Neal's corner over the crossbar before Radhi Jaidi squandered a similar chance from McSheffrey's corner.

Preston made the breakthrough in the 85th minute when Whaley latched onto a loose ball in the penalty area, shrugged off a covering challenge and rounded goalkeeper Doyle before slotting the ball into an empty net.

Preston substitute Michael Ricketts saw his shot from the edge of the area soon after tipped around the post and Jaidi dragged his effort wide.

Larsson's late free-kick was then blocked by Hill as Birmingham settled for a second-place finish leaving the Lilywhites to contemplate another season in the Championship.