The nation's capital has officially become the latest safe haven for illegal immigrants.

District of Columbia Mayor Vincent Gray on Wednesday signed an executive order instructing police officers not to question people about their immigration status -- even people who are arrested on other matters -- unless immigration status is directly related to a criminal investigation.

"This executive order ensures public safety by ensuring that our police resources are deployed wisely and our immigrant communities feel safe cooperating with those who are sworn to protect them," Gray said in a statement.

"The district is home to thousands of immigrants," he added. "If they are afraid to cooperate with authorities on criminal investigations because they fear it might endanger their presence in the United States or the presence of a loved one, then it endangers their public safety and that of our entire city."

Although district officials say the order only confirms a longstanding policy, critics still blasted the move.

"This is an abomination," said Corey Stewart, the Republican chairman-at-large of Prince William County of Virginia, which is about 25 miles south of D.C. Stewart's county has sued the Department of Homeland Security twice, seeking information on 4,000 illegal immigrants that the county has arrested and turned over to Homeland Security for deportation.

"This is the capital of the United States," Stewart told FoxNews.com, "and to have the nation's capital as a sanctuary city where essentially federal law is not going to be enforced sends all the wrong messages -- not just in the United States but around the world."

The term "sanctuary city" is used to describe places where local officials refuse to enforce federal immigration laws and undocumented workers are free to seek jobs, housing or local government services without fear of deportation unless targeted by federal agencies.

Deputy Mayor for Public Safety Paul Quander said the order does not mean the district is opting out of a mandatory federal program called Secure Communities, which directs local agencies to share fingerprints collected from people in local jails with the Department of Homeland Security. The program is expected to be in place nationwide by 2013.

But Stewart noted Secure Communities is only relevant once people are arrested and jailed.

"So the fact they they're going to comply with Secure Communities is of little consequence."

In signing the order, Gray said he wanted to clarify that the local police in district are not in the business of enforcing federal immigration laws.