ABC News(WASHINGTON) -- Some social media users, including a member of Congress from his own party, called Sen. John McCain “racist” for a tweet comparing the president of Iran to a monkey sent from his account Monday morning.

McCain, R-Ariz., followed up the tweet with another indicating that he had meant the comparison as a joke.

But some people on Twitter weren’t amused. Rep. Justin Amash, R-Mich., 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.

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.

“You can see the ferocity and depth of this form of representation most clearly when looking at the history of how racist whites constructed representations of African Americans,” Pascale wrote in an email to ABC News. “As Arabs became racialized post 9/11 much the same imagery and rhetoric was used.”

Some people on Twitter argued that McCain’s use of the term was justified because of the perceived racist remarks Mahmoud 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 Mahmoud Ahmadinejad “has nothing to do with race.”