Former Pakistan captain Mohammad Hafeez announced his retirement from international cricket Monday, ending an 18-year career that included a 12-month ban from bowling because of a suspect action.

The 41-year-old last played for his country at the Twenty20 World Cup in the United Arab Emirates in October-November last year when Pakistan lost in the semi-final to eventual champions Australia.

Having retired from Test cricket in 2018 and not figuring in Pakistan’s one-day international squad since the 2019 World Cup, Hafeez decided it was the right time to quit all formats.

“I played with pride and satisfaction,” the veteran of 55 Tests, 218 one-dayers and 119 Twenty20 internationals told a news conference in Lahore.

“In fact, I have earned and accomplished more than I had initially envisaged.”

Hafeez scored 3,652 runs and took 53 wickets at Test level, while his tally in the limited-overs game was 6,614 runs and 139 wickets.

Hafeez is Pakistan’s second-highest run-scorer in Twenty20s with 2,514 and also has 61 international wickets in the shortest format.

An off-break bowler, his action was deemed illegal on four occasions and he was banned from bowling for a year in July 2015.

Hafeez is also remembered for protesting against Mohammad Amir being allowed to return to international cricket after serving a five-year ban for match-fixing.

“I thought that those who fixed matches should not be allowed to play for Pakistan again,” he said.

“But it became a low point in my career and hurt me because I was told to mind my own business.”

Hafeez captained Pakistan in 29 Twenty20 matches, winning 17. He also led in the team once at Test level and twice in ODIs.