John McCain
Senator John McCain (Reuters)

US Senator John McCain has compared Iranian leader Mahmoud Ahmadinejad to a monkey in language that has stirred a controversy across the political spectrum.

Following the Iranian president's offer to be the first Iranian sent into space in the wake of a successful rocket launch of a monkey, McCain went on Twitter to lampoon Ahmadinejad.

So Ahmadinejad wants to be first Iranian in space - wasn't he just there last week? "Iran launches monkey into space" news.yahoo.com/iran-launches-…

His crack raised some hackles, however, and McCain, 76, responded with another tweet: "Re: Iran space tweet - lighten up folks, can't everyone take a joke?"

Republican congressman Justin Amash criticised the senator saying he should "wisen up and not make racist jokes".

In 2011, McCain took on Russian President Vladimir Putin on Twitter claiming: "The Arab Spring is coming to a neighbourhood near you."

Ahmadinejad said that he was poised "to be the first human to be sent to space by Iranian scientists".