Mohammad Irfan has been ruled out of the remainder of the England tour after suffering cramps during his comeback match in the fourth ODI at Headingley. Hasan Ali will replace him in the T20 squad.

A statement from the PCB said that Irfan's cramp began in his hamstrings before developing in both his right and left calf and that he will be sent back to the National Cricket Academy to work on his fitness.

Irfan, who was called into the squad after Mohammad Hafeez was ruled out, had started promisingly on his return, removing Alex Hales and Jason Roy during a lively five-over opening spell, and also troubled Eoin Morgan. After spending time off the field he tried to bowl again for the 42nd over of the innings but could only manage one delivery, a wide that did not touch the pitch, before walking off again.

Mickey Arthur, the Pakistan coach, did not hide his frustrations in the dressing room but later defended Irfan's call-up despite his very limited recent cricket, insisting that "checks and balances" had been in place.

Shortly before the news of Irfan's withdrawal was confirmed Azhar Mahmood, Pakistan's bowling coach, said it had to be acknowledged that Irfan's size made him a unique case.

"Definitely Mickey was unhappy and as bowling coach I was unhappy as well. We had a chance to win that game the other day," Mahmood said. "Unfortunately, everyone gets cramp. He is a big guy and his body is totally different to a normal human. But he got cramps."

Mahmood, who took on his current role at the start of this series, replacing Mushtaq Ahmed who had been bowling coach for the Test series, defended Pakistan's attack and said he had seen improvement after they conceded the world record 444 for at Trent Bridge.

"They bowled really well [at Headingley] and if Irfan wasn't getting cramps, it was a different ball game. Definitely, we didn't bowl well enough in Nottingham. If you see Trent Bridge, every score is at least 381 in the last 50 over-games. Unfortunately we didn't bowl well, but we are working hard on our skills, our line and length and all disciplines.

"We didn't bowl any no-balls in the last game, we bowled five beforehand so this is a positive and we have a young guy, Hasan Ali, who is promising. He has shown some grit and we see Umar Gul is back. He didn't bowl well in Southampton but he has come back - it's totally different when you are playing in a match and in a tough situation. Under pressure, you do different things, you know."