"So Ahmadinejad wants to be first Iranian in space wasn't he just there last week "Iran launches monkey into space," John McCain (@SenJohnMcCain) February 4, 2013, tweeted.
According to ABC News, McCain, Republican-Arizona, followed up the tweet with another indicating that he had meant the comparison as a joke.
"Iran space tweet lighten up folks, can't everyone take a joke" John McCain (@SenJohnMcCain) February 4, 2013 replied.
But some people on Twitter were not amused. Justin Amash, Republican-Michigan, replied to McCain's second tweet, saying, "Maybe you should wisen up & not make racist jokes."
Another user challenged the second-term congressman's qualification of McCain's joke as racist.
Amash tweeted back, "I'll bet many Iranians would feel differently."
According to the report, Celine-Marie Pascale, a sociology professor at American University in Washington, said the word 'monkey' would have triggered readers to perceive the comment as racist because it has historically been used by racist whites to describe people of color.
Some people on Twitter argued that McCain's use of the term was justified because of the perceived racist remarks Ahmadinejad has made about Israelis.
Ana Navarro, who served as McCain's national Hispanic co-chair during his 2008 presidential campaign, said McCain's dislike of Ahmadinejad "has nothing to do with race."
According to the report, McCain's office declined to comment.