England fought back strongly to leave the third Test against Pakistan hanging in the balance after an enthralling third day in Birmingham Friday. The hosts bowled out Pakistan for 400 before Alastair Cook and Alex Hales took them to 120 for no wicket in their second innings at the close, 17 runs ahead with two days remaining at Edgbaston. Pakistan moved on to 336 for five at lunch and looked set to establish a commanding first-innings lead but England picked up its last five wickets quickly to get a foothold in the match. Cook and Hales batted positively, the former ending on 64 not out and Hales taking a single off the final ball of the day to reach his first fifty of the series which is level at 1-1. Pakistan's batsmen have found Moeen Ali to their liking this series and Misbah reverse-swept him for four when the off-spinner came on before lunch. After resuming on 257 for three, Pakistan lost the key wicket of Younis Khan in the morning session but captain Misbahul Haq led from the front with a combative 56. Misbah was bowled by James Anderson before England's leading strike bowler was ordered out of the attack for the rest of the innings after transgressing cricket's follow-through laws for a third time. Anderson had apologized to the umpires Thursday for his reaction to receiving his first two warnings for running on the pitch. "I had a bad half-hour where I let things get to me," Anderson said Thursday. "I've apologized to both umpires, because my behavior wasn't acceptable. I know I was out of order for the way I behaved. "It wasn't acceptable and it was petulant," added Anderson, reprimanded earlier this season for "disrespecting" Indian umpire S Ravi in the Lord's Test against Sri Lanka. Stuart Broad and Chris Woakes claimed three wickets each to run through Pakistan's lower order. Scoreboard England (1st Innings) 297 Pakistan (1st Innings) Hafeez c Ballance b Anderson 00 Sami run out (Vince) 82 Azhar c Cook b Woakes 139 Younis c Bairstow b Woakes 31 Misbah b Anderson 56 Asad b Broad 00 Sarfraz not out 46 Yasir run out (Woakes/Bairstow) 07 Amir lbw b Woakes 01 Sohail lbw b Broad 07 Rahat c Root b Broad 04 Extras (b5, lb21, nb1) 27 Total (all out, 136 overs) 400 Falls: 1-0 (Hafeez), 2-181 (Aslam), 3-257 (Azhar), 4-274 (Younis), 5-296 (Shafiq), 6-358 (Misbah), 7-367 (Shah), 8-368 (Amir), 9-386 (Sohail), 10-400 (Rahat). Bowling: Anderson 29.1-7-54-2; Broad 30-4-83-3 (1nb); Finn 27.5-7-76-0; Woakes 30-7-79-3; Ali 17-2-79-0; Vince 1-0-2-0; Root 1-0-1-0. England (2nd Innings) A. Cook not out 64 A. Hales not out 50 Extras (lb4, nb2) 06 Total (0 wkts, 35 overs) 120 To bat: J Root, J Vince, G Ballance, J Bairstow, M Ali, C Woakes, S Broad, S Finn, J Anderson. Bowling: Amir 11-2-28-0; Sohail 8-0-40-0 (2nb); Rahat 5-0-20-0; Shah 11-1-28-0.