U.S. Secretary of State Rex Tillerson has directed U.S. diplomatic missions to identify “populations warranting increased scrutiny” and toughen screening for visa applicants in those groups, according to diplomatic cables seen by Reuters.

He has also ordered a “mandatory social media check” for all applicants who have ever been present in territory controlled by the Islamic State, in what two former U.S. officials said would be a broad, labor-intensive expansion of such screening. Social media screening is now done fairly rarely by consular officials, one of the former officials said.

Four cables, or memos, issued by Tillerson over the last two weeks provide insight into how the U.S. government is implementing what President Donald Trump has called “extreme vetting” of foreigners entering the United States, a major campaign promise. The cables also demonstrate the administrative and logistical hurdles the White House faces in executing its vision.

The memos, which have not been previously reported, provided instructions for implementing Trump’s March 6 revised executive order temporarily barring visitors from six Muslim-majority countries and all refugees, as well as a simultaneous memorandum mandating enhanced visa screening.

The flurry of cables to U.S. missions abroad issued strict new guidelines for vetting U.S. visa applicants, and then retracted some of them in response to U.S. court rulings that challenged central tenets of Trump’s executive order.

The final cable seen by Reuters, issued on March 17, leaves in place an instruction to consular chiefs in each diplomatic mission, or post, to convene working groups of law enforcement and intelligence officials to “develop a list of criteria identifying sets of post applicant populations warranting increased scrutiny.”

Applicants falling within one of these identified population groups should be considered for higher-level security screening, according to the March 17 cable.

Those population groups would likely vary from country to country, according to sources familiar with the cables, as the March 17 memo does not explicitly provide for coordination between the embassies.

Trump has said enhanced screening of foreigners is necessary to protect the country against terrorist attacks.

Advocates and immigration lawyers said the guidance could lead to visa applicants being profiled on the basis of nationality or religion rather than because they pose an actual threat to the United States.

“Most posts already have populations that they look at for fraud and security issues,” said Jay Gairson, a Seattle-based immigration attorney who has many clients from countries that would be affected by Trump’s travel ban.

“What this language effectively does is give the consular posts permission to step away from the focused factors they have spent years developing and revising, and instead broaden the search to large groups based on gross factors such as nationality and religion.”

Virginia Elliott, a spokeswoman for the State Department’s Bureau of Consular Affairs, said the department was working to implement Trump’s presidential memorandum “in accordance with its terms, in an orderly fashion, and in compliance with any relevant court orders, so as to increase the safety and security of the American people.”

State Department officials declined to comment on the specifics of the cables, saying they were internal communications.

CABLE FLURRY

In cables dated March 10 and March 15, Tillerson issued detailed instructions to consular officials for implementing Trump’s travel order, which was due to take effect on March 16.

Following successful legal challenges to an earlier, more sweeping travel ban signed by Trump in January, the White House issued a narrower version of the ban earlier this month.

On the same day Tillerson sent out his memo about implementing the new executive order on March 15, a federal court in Hawaii enjoined key parts of the order. That forced him to send another cable on March 16, rescinding much of his earlier guidance.

On March 17, Tillerson issued a fourth cable that set out a new list of instructions for consular officials. At the same time, it withdrew more sections of the March 15 guidance, because they had been issued without approval from the White House Office of Management and Budget (OMB), which is responsible for reviewing all agency rules.

A White House spokesman referred questions about the cables to the State Department and OMB.

Reuters could not determine to what extent the cables departed from guidance given to consular officers under previous administrations, since this type of guidance is not made public.

Some of the language in the cables, including the line that “all visa decisions are national security decisions,” is similar to statements made by U.S. officials in the past.

Some consular officials suggested some of the March 17 guidance – aside from identifying particular populations and doing more social media checks - differed little from current practice, since vetting of visa applicants is already rigorous.

PHONE NUMBERS, EMAIL ADDRESSES

Among the instructions rescinded by Tillerson were a set of specific questions for applicants from Iran, Libya, Somalia, Sudan, Syria and Yemen, the countries targeted by Trump’s March 6 executive order, as well as members of populations identified as security risks.

The questions asked where applicants had lived, traveled and worked over the previous 15 years. Applicants would also have been required to provide prior passport numbers and all phone numbers, email addresses and social media handles used in the previous five years.

The March 16 and 17 cables from Tillerson instructed consular officers not to ask those questions, due to court action and pending approval by the OMB.

Both Republicans and Democrats in Congress have called for wider social media screening for those seeking to enter the United States, saying that such checks could help to spot possible links to terrorist activity.

Some former officials and immigration attorneys cautioned that delving deeper into applicants’ social media use could significantly lengthen processing time of visas.

“There’s so much social media out there,” said Anne Richard, a former U.S. assistant secretary of state in the Obama administration. “It’s not something you can do on a timely basis.”

Both the March 15 and March 17 cables seem to anticipate delays as a result of their implementation. They urged embassies to restrict the number of visa interviews handled per day, acknowledging this “may cause interview appointment backlogs to rise.”

To read the cables:

(Additional reporting by Kristina Cooke in San Francisco and Arshad Mohammed and John Walcott in Washington; Editing by Sue Horton and Ross Colvin)