Donald Trump has received much flak from Democrats and Republicans alike for his proposal to ban Muslims from entering the U.S through executive authority. However, the past six presidents have all used the executive power to bar different classes of immigrants.

Section 212(f) of the Immigration and Nationality Act of 1952 states: “Whenever the President finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate.”

[dcquiz]President Barack Obama has used the authority this statute provides six times in his tenure. In July 2011, Obama barred the entry of “anyone under a UN travel ban; anyone who violates any of 29 executive orders regarding transactions with terrorists, those who undermine the democratic process in specific countries, or transnational criminal organizations.”

In April of 2012, he barred the entry of anyone “facilitating computer or network disruption that could assist in or enable serious human rights abuses by or on behalf of the government of Iran and Syria; anyone who have sold or provided goods, services, or technology to Iran or Syria likely to be used for such purposes; or to have materially assisted anyone whose property or interests are described.”

Former President George W.Bush used this authority six times as well during his tenure, typically on government officials. In January 2004, he signed an order “barring entry for public officials who solicit or accept bribes in exchange for any act or omission in their public duties that has serious adverse effects on the national interests of the U.S.; anyone who provides or offers to provide such a bribe; any current or former public official whose misappropriation of public funds or interference with public processes has had serious adverse effects on the national interests of the U.S.; or the immediate families.”

The groups Bush barred for entry included members of the Mugabe government in Zimbabwe and the Lukashenka government in Belarus.

The authority of the president to bar certain classes of aliens was used six times by former President Bill Clinton. For example, in May of 1994 Clinton signed an order “barring entry for members of the Haitian military, their immediate families, any major participants in the coup d’état of 1991.”

Then in January of 1998, Clinton signed an order “barring entry for members of the military junta in Sierra Leone, and their families.”

Former President George H.W Bush only used this executive authority once in his four years of office. When he did use it, it was actually to undo a previous executive order by President Ronald Reagan that suspended entry of officers and employees of the Nicaraguan government.

Former President Ronald Reagan used this executive authority five times while in office. In September of 1981, he barred the entry of “any undocumented aliens arriving at the borders of the United States from the high seas.” In August of 1986, Reagan signed an order “barring entry for any Cuban nationals or immigrants except in certain cases.” These “certain cases” included Cuban nationals who had applied for entry into the U.S as immediate family members and those who under law were “special immigrants.”

Former President Jimmy Carter used this executive power only once and in a way quite similar to what Trump has proposed. In April 1980, as the U.S embassy in Tehran was under terrorist control, Carter signed an order invalidating “all visas issued to Iranian citizens for future entry into the United States.” The order said that the U.S “will not reissue visas, nor will we issue new visas, except for compelling and proven humanitarian reasons or where the national interest of our own country requires.”

Law Professor Jan Ting of Temple University told The Daily Caller that “absolutely and without any doubt” does existing law allow Trump to restrict immigration of certain nationalities or religious groups.