Arizona Republican Sen. John McCain is calling on President Obama to suspend aid to Egypt after its military overthrew the country’s government.

McCain, a member of the Senate’s Foreign Relations Committee, on Friday called for the United States to suspend its $1.5 billion in annual aid, based on long-standing federal law that prohibits the U.S. from giving aid to countries in which a military coup overthrows a democratically elected government.

“We cannot repeat the same mistakes that we made at other times in our history by supporting the removal of freely elected governments,” McCain said during a public event in Prescott, Ariz.

The demonstrations in Egypt started in late June, and on Wednesday the military removed President Mohamed Morsi, a member of the Muslim Brotherhood’s political party who was elected in June 2012.

“The president was freely elected,” said McCain, who acknowledged that he thought “long and hard” about his request, considering Morsi had “mismanaged” the county since taking over.

The U.S. has suspended aid to several countries recently including Mali in 2009 and Honduras in 2009.

The Egyptian military has already inserted a new president, Adly Mansour. However, McCain said the military must set a time table for elections and drafting a new constitution before the U.S. can consider continuing the aid.

“The USA must learn the lessons of history, and that is we cannot stand by, without acting in cases where freely elected governments are unseated by the military arm of those nations,” McCain said.