This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON — The Trump administration plans to require immigrants applying to come to the United States to submit five years of social media history, it announced Thursday, setting up a potential scouring of their Twitter and Facebook histories.

The move follows the administration’s emphasis on “extreme vetting” of would-be immigrants to the US, and is an extension of efforts by the previous administration to more closely scrutinize social media after the San Bernardino terrorist attack.

According to notices submitted by the State Department on Thursday, set for formal publication on Friday, the government plans to require nearly all visa applicants to the US to submit five years of social media handles for specific platforms identified by the government — and with an option to list handles for other platforms not explicitly required.

The administration expects the move to affect nearly 15 million would-be immigrants to the United States, according to the documents. That would include applicants for legal permanent residency. There are exemptions for diplomatic and official visas, the State Department said.

The decision will not take effect immediately — the publication of the planned change to visa applications on Friday will start a 60-day clock for the public to comment on the move.

The potential scouring of social media postings by potential immigrants is sure to rankle privacy and civil liberties advocates, who have been vocal in opposing such moves going back to efforts by the Obama administration to collect such information on a more selective and voluntary basis.

Critics complain the moves, amid broader efforts by the administration, are not only invasive on privacy grounds, but also effectively limit legal immigration to the US by slowing the process down, making it more burdensome and making it more difficult to be accepted for a visa.

Federal authorities argue the moves are necessary for national security.

In addition to requiring the five years of social media history, the application will also ask for previous telephone numbers, email addresses, prior immigration violations and any family history of involvement in terrorist activities, according to the notice.

Since its early days, the administration has been telegraphing a desire to more closely dig through the backgrounds and social media histories of foreign travelers, but Thursday’s move is the first time that it will formally require virtually all applicants to come to the US to disclose that information.

After the San Bernardino terrorist attack in 2015, greater attention was placed on immigrants’ social media use, when it was revealed that one of the attackers had advocated jihad in posts on a private social media account under a pseudonym that authorities did not find before allowing her to come to the US.

The move by the Trump administration stops short of requiring passwords or access to those social media accounts, although then-Homeland Security Secretary John Kelly suggested last year that it was being considered.

The administration has been pursuing “extreme vetting” of foreigners as a centerpiece of its immigration and national security policy, including through the contentious travel ban that remains the subject of heavy litigation.