Pakistan spinner Saeed Ajmal announced his retirement from all forms of cricket on Monday, two years after losing his wicket-taking bite with a remodelled bowling action that was twice deemed illegal.

During a successful but controversial career, Ajmal was once celebrated as the world’s number one bowler in one day internationals (ODIs) and Twenty20 cricket, and was almost as successful in Tests.

He famously captured 24 wickets in three Tests against England in 2012.

But his time in the limelight was cut short after a temporary ban for chucking saw him return to the sport in 2015 without the same form.

He took just one wicket in two ODIs and a Twenty20 in Bangladesh, his first matches after being cleared to bowl, and was never selected for the national team again.

“I am quitting all forms of cricket after the current National Twenty20 tournament,” Ajmal was quoted as saying.

“It was a highly satisfying career in which I achieved whatever goals I set for myself and helped the team win matches.”

Ajmal took 178 wickets in 35 Tests, the last of which was at Galle in Sri Lanka in 2014, where his bowling action was reported for a second time. It was first reported during an ODI series against Australia in the UAE in 2009.

He finished with 184 wickets in 113 ODIs, and 85 in 64 Twenty20 internationals.

But in spite of his early successes, Ajmal said the last two years of his career had been frustrating.

“Ban over action left me frustrated and hurt,” he said. “More hurtful was that current player Stuart Broad questioned that and his comments hurt me no end. But I have forgiven everyone.”

England fast bowler Broad questioned the legality of Ajmal’s action when the Pakistani spinner was featuring in an English county championship a month before the umpires’ report in Sri Lanka.

Ajmal took a swipe at the process of calling bowlers out for illegal action.

“It seems that the process was meant for me and (Mohammad) Hafeez, all other bowlers with questionable actions are still playing,” he said.

Hafeez’s action was reported for a second time last month.

Ajmal said he will concentrate on coaching in the future.