Republican Sens. John McCain and Lindsey Graham visited Cairo in a bid to help resolve the standoff between the military-backed interim government and supporters of ousted President Mohammed Morsi.

The lawmakers urged Egypt's interim leaders to release jailed members of the Muslim Brotherhood. They also strongly urged an all-party national dialogue, which should include the Muslim Brotherhood.

Sen. McCain described the ousting of former Egyptian president Mohamed Morsi as a coup, in direct contradiction of the official White House position.

Irrespective of the real intentions of his visit, Sen. McCain needs to explain the following rather glaring inconsistencies in his thinking:

Why did he consider the military removal of “secular” Egyptian president Hosni Mubarak — in response to popular demand — a “revolution,” while he now regards the military removal of “Islamist” Egyptian president Mohammed Morsi — also based on popular demand — as a “coup d’état?”

If the Jan 25 revolution was made legitimate by sheer numbers of protesters (i.e., the fact that millions rather than, for example, hundreds of demonstrators called for Mubarak’s removal gave legitimacy to the military response — in preference to a more traditionally democratic “throw out the bums at the ballot” response), then why is the same principle — sheer numbers — not applied to the removal of Morsi, who enjoyed even less public support than Mubarak?

Why the 180-degree shift in his views on the Muslim Brotherhood? On Feb. 6, 2011, in an interview with Der Spiegel, Sen. McCain was asked: “What is your assessment of the Muslim Brotherhood?” He replied: “I think they are a radical group that first of all supports Sharia law; that, in itself, is anti-democratic — at least as far as women are concerned. They have been involved with other terrorist organizations and I believe that they should be specifically excluded from any transition government.” As mentioned above, however, on his recent visit to Egypt, Sen. McCain strongly urged an all-party national dialogue, which should include the Muslim Brotherhood. What’s changed?

If a democratically elected American president were to break his presidential oath by issuing a decree that gave himself sweeping powers, such that all his future decrees became uncontestable in any court, and then he used this new power to allow his violent supporters to surround the Supreme Court, threaten justices, and prevent them from convening so as to eliminate the possibility of a judicial review of his decision (which is exactly what Morsi did after assuming power in Egypt), would Sen. McCain regard it as legitimate to remove such a president from power?

How can he inexplicably describe himself as “proudly pro-Israel,” while supporting the anti-Semitic Morsi, who has described Jews as “descendants of pigs and monkeys” and who asked Muslims to nurse their children’s hatred of Jews?

Sen. McCain also needs to clarify his position on how the Egyptian government ought to respond to the violent Islamist demonstrators. Should the Egyptian government allow them to kill innocent anti-Morsi protesters (as they are already doing) — or should the government of Egypt crack down on these Islamist radicals, even if this necessitates the use of violence?

Sen. McCain has portrayed the situation in Egypt as a question of reconciliation between two equal factions. The truth of the matter is very different indeed. In fact, there are only a few thousand Morsi supporters demonstrating in the streets versus literally millions against him.

Unlike Rep. Michele Bachmann’s strong support for the revolution against the Islamists, which was perceived in a very positive manner by many — if not most —Egyptians, Sen. McCain’s bizarre support for the Muslim Brotherhood has caused extensive damage to the image of the U.S. in the region.

Fortunately, Secretary of State John Kerry characterized the recent troubles as a military takeover to” restore democracy” rather than as a coup. His statement has done much to ameliorate the negative reaction to Sen. McCain’s comments.

It is also fair to mention that Sen. McCain and Sen. Lindsey Graham referred to Morsi as a “former” president in The Washington Post and blamed both sides for the current conflict in Egypt.

Their comments in the Post were more balanced and helpful than their remarks in Cairo, which have created an uproar against the U.S. and empowered Islamists.