|By Doina Chiacu and Steve Holland

|By Doina Chiacu and Steve Holland

|By Doina Chiacu and Steve Holland

WASHINGTON (Reuters) - President Donald Trump's administration on Sunday tempered a key element of his move to ban entry of refugees and people from seven Muslim-majority countries in the face of mounting criticism even from some prominent Republicans and protests that drew tens of thousands in major American cities.

Trump signed the directive on Friday, but the policy appeared to be evolving on the fly. Democrats and a growing number of Republicans assailed the move and foreign leaders condemned it amid court challenges and tumult at U.S. airports.

The president's critics have said his action unfairly singled out Muslims, violated U.S. law and the Constitution and defiled America's historic reputation as hospitable to immigrants.

In a fresh defense of the action on Sunday, Trump said his directive was "not about religion" but keeping America safe. Trump has presented the policy as a way to protect the country from the threat of Islamist militants.

U.S. Homeland Security Secretary John Kelly said in a statement that people from the seven countries who hold so-called green cards as lawful permanent U.S. residents would not be blocked from returning to the United States from overseas, as some had been after the directive.

All green card holders who were detained at U.S. airports had been admitted into the country by late Sunday, a U.S. official familiar with the process told Reuters. The source could not provide a figure of how many people whose re-entry had been delayed, in some cases for hours.

Outside the White House, where some viewing stands from Trump's Jan. 20 inaugural parade still stood, several thousand protesters denounced him, carrying signs such as "Deport Trump" and "Fear is a terrible thing for a nation's soul."

Protests also were staged in cities and airports in New York, Los Angeles, Boston, Houston, Dallas and elsewhere.

The Republican president on Friday put a four-month hold on allowing refugees into the country, an indefinite ban on refugees from Syria and a three-month bar on citizens from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.

Border and customs officials struggled to put Trump's directive into practice. Confusion persisted over details of implementation, in particular for the people who hold green cards.

Senator Bob Corker, the Republican chairman of the U.S. Senate Foreign Relations Committee and a Trump supporter, said the president's order had been poorly implemented, particularly for green card holders.

"The administration should immediately make appropriate revisions, and it is my hope that following a thorough review and implementation of security enhancements that many of these programs will be improved and reinstated," Corker said.

Trump defended his action.

"To be clear, this is not a Muslim ban, as the media is falsely reporting," Trump said in a statement on Sunday. "This is not about religion - this is about terror and keeping our country safe. There are over 40 different countries worldwide that are majority Muslim that are not affected by this order."

He added: "We will again be issuing visas to all countries once we are sure we have reviewed and implemented the most secure policies over the next 90 days."

The department said on Saturday Trump's action did apply to people with green cards who were returning to the United States from the seven nations, while a White House official said green card holders who had left the United States and wanted to return would have to visit a U.S. embassy or consulate to undergo additional screening.

White House Chief of Staff Reince Priebus then went on the Sunday morning news programs to say those people would not be blocked.

"As far as green card holders moving forward, it doesn't affect them," Priebus said on the NBC program "Meet the Press."

Priebus added that these green card holders would be subjected to "more questioning" by U.S. Customs and Border Patrol agents when they try to re-enter the United States "until a better program is put in place over the next several months."

In an apparent indication that Kelly's instructions were being implemented, some green card holders arriving in the United States said they had no trouble clearing customs.

Mahdi Tajsarvi, an engineer who lives in Virginia, said he and his wife, Arezoo Hosseini, both Iranian citizens with U.S. green cards, were asked a few routine questions by authorities at Dulles International Airport outside Washington on Sunday evening and let through within a few minutes.

MORE NATIONS MAY BE ADDED

Priebus also said Customs and Border Patrol agents would have "discretionary authority" when they encountered someone arriving who they suspect "is up to no good" from certain nations.

Asked why Saudi Arabia, Afghanistan, Pakistan and Egypt were not included on Trump's list, Priebus said that "perhaps other countries needed to be added to an executive order going forward."

U.S. judges in at least five states blocked federal authorities from enforcing Trump's directive, but lawyers representing people covered by the order said some authorities were unwilling on Sunday to follow the judges' rulings.

U.S. Senators John McCain and Lindsey Graham, prominent Republican foreign policy voices, said in a joint statement Trump's order may do more to help recruit terrorists than improve U.S. security.

"Ultimately, we fear this executive order will become a self-inflicted wound in the fight against terrorism," they said, adding the United States should not stop green card holders "from returning to the country they call home."

"This executive order sends a signal, intended or not, that America does not want Muslims coming into our country," the added.

Trump blasted the two senators in a Twitter statement, calling them "sadly weak on immigration."

In a another Twitter message earlier on Sunday, Trump said the United States needed "strong borders and extreme vetting, NOW."

"Christians in the Middle-East have been executed in large numbers. We cannot allow this horror to continue!" added Trump, who successfully tapped into Americans' fear of attacks during his election campaign.

Trump's tweet did not mention that many more Muslims have been killed in the bloody Syrian civil war and other violence in the targeted countries.

Condemnation of Trump's action poured in from abroad, including from traditional allies of the United States.

In Germany, which has taken in large numbers of people fleeing the Syrian civil war, Chancellor Angela Merkel said the global fight against terrorism was no excuse for the measures and "does not justify putting people of a specific background or faith under general suspicion," her spokesman said on Sunday.

Canada will offer temporary residency to people stranded in the country as a result of Trump's executive order on immigration, Canadian Immigration Minister Ahmed Hussen said.

Briefing reporters at the White House on condition of anonymity, a U.S. administration official rejected criticism of the way Trump's plan had been carried out, saying: "So it really is a massive success story in terms of implementation on every single level."

Chuck Schumer, the top Democrat in the Republican-led U.S. Senate, had a different view, calling Trump's administration incompetent.

"One hand doesn't know what the other is doing," Schumer said.

"I think banning refugees, banning immigrants, banning religions like Islam or any other religion, is un-American," said Will Turner, 42, draped in a U.S. flag among a crowd of several thousand people in front of the White House chanting: "No hate, no fear, refugees are welcome here."

An official of the conservative billionaire industrialist Koch brothers' political network of donors criticized Trump's immigration order at the donors' winter gathering in Indian Wells, California.

"Our country has benefited tremendously from a history of welcoming people from all cultures and backgrounds. This is a hallmark of free and open societies," Brian Hooks said in a statement.

Civil rights and some religious groups, activists and Democratic politicians have promised to fight Trump's order and Schumer said his party would introduce legislation to overturn it. Republicans control both the House of Representatives and the Senate.

Priebus said that of 325,000 people who arrived from foreign countries on Saturday, 109 people were detained for further questioning, and most of them were moved out, with just a "couple dozen more that remain" detained.

"It wasn't chaos," he said.

Judges in California, Massachusetts, Virginia and Washington state, each home to international airports, issued their rulings after a similar order was issued on Saturday night by U.S. District Judge Ann Donnelly in New York's Brooklyn borough in a case involving two Iraqis caught by the order as they flew into the country.

Attorneys general from California, New York, 13 other states and Washington, D.C., condemned and pledged to fight what they called Trump's "dangerous" and "unconstitutional" order.