The Blues created the first opportunity of the game on three minutes, but Hayden Mullins headed wide of the target from 12-yards.
On the quarter of an hour mark, Michael Bostwick was inches away from a second goal in Posh colours as his stunning 25-yard shot struck the underside of the crossbar.
The deadlock was broken on 29 minutes and it was an unfortunate moment for goalkeeper Bobby Olejnik, who came to punch and inswinging free-kick, connected, but as the ball bounced it spun back towards goal and found the back of the net over Zakuani on the line.
Grant McCann, who was taken off the transfer list during the week, curled a left-foot free-kick over the crossbar on 33 minutes after Swanson was upended.
Moments later, the hosts felt they should have had a penalty as Ntlhe appeared to foul Lovenkrands, but it was not given. Less than 60 seconds later, Boyd flashed a cross-shot inches past the post with Barnett closing in.
Michael Bostwick then tested Butland with a fierce drive after a well-taken free kick, which the goalkeeper grabbed at the second attempt. Zakuani was replaced by Lee Frecklington at the break with Bostwick filling in at centre back.
Substitute Frecklington tested goalkeeper Butland with a fierce drive after a good burst from midfield on 53 minutes.
Lovenkrands glanced a header wide of the target moments after Craig Alcock replaced Ntlhe.
Posh were playing some excellent football, but it was the final ball and that bit of luck that was letting them down in front of goal.
Emile Sinclair was introduced for Swanson with 11 minutes remaining to try and find the equaliser and he immediately found an understanding with the excellent Barnett. Barnett should have tested Butland moments later from a glorious Bostwick delivery, but he headed over.
Goalkeeper Olejnik made a fine stop to deny King on 82 minutes after Brisley stood off his man. Boyd then headed straight at Butland after a good delivery from Tomlin. Olejnik pushed away a Burke effort before Sinclair was inches away from an equaliser, the ball rolling agonisingly wide.
Final Score: Birmingham City 1-0 Posh
Birmingham: Butland, Murphy, Caldwell, Ibanez, Burke, Mullins, King, Lovenkrands (sub Gomis 76min), Elliott (sub Redmond 62min), Caddis, Spector. Unused subs: Doyle, Morrison, Asante, Packwood, Hancox.
Posh: Olejnik, Little, Brisley, Zakuani (sub Frecklington 46min), Ntlhe (sub Alcock 65min), McCann, Bostwick, Boyd, Swanson (sub Sinclair 79min), Barnett, Tomlin. Unused subs: Day, Clarke-Harris, Knight-Percival, Newell.
Attendance: 14,992 (629 Posh fans)