A new revised policy was issued Thursday by Gov. Baker’s administration that will now allow state police to temporarily detain some people wanted by federal immigration authorities.

This new policy allows state police to detain people who are in the country illegally and fall into one of several priority enforcement categories, including being suspected of posing a threat to national security. Other categories include people convicted of major felonies or of being active participants in street gangs.

These guidelines, which will go into effect immediately, allow state police to detain some people who are in the country illegally for up to 48 hours.

This reverses the previous state policy put in place during the administration of former Governor Deval Patrick.

According to state police, the revisions are in line with the federal Priority Enforcement Program. State police will be allowed to contact U.S. Immigration and Customs Enforcement directly.

Gov. Baker says this is aimed at detaining people who are a threat to public safety or national security.

The Executive Director of the Massachusetts Refugee Advocacy Coalition said her group questions whether this policy is necessary.

State officials stressed that under the guidelines troopers would still not be allowed to stop or arrest people on the sole basis of immigration status. The guidelines apply only to state police, not local police departments.