A federal judge has ordered the release of documents relating to a controversial immigration enforcement program after civil rights groups and immigration advocates pressed for the information to become public.

U.S. District Judge Shira Scheindlin has ordered the government to turn over a key memorandum pertaining to the Secure Communities program by Nov. 1 to civil rights groups and immigrant advocates.

The release is expected to show why the controversial program was made mandatory.

The Secure Communities program enables the fingerprints of detainees arrested locally to be shared with federal authorities.

In a statement, the plaintiffs assert that the judge's order will shine light on a program plagued with secrecy and lies. 

Critics of Secure Communities say that while officially it is supposed to target criminals for detention and deportation, it has led to the deportation of undocumented immigrants who have no known criminal or terrorist backgrounds.

Several states have said they don't want to participate, arguing that immigration is a federal, not state, responsibility.

Homeland Security Secretary Janet Napolitano, whose agency oversees immigration matters, has denied that the program had led to more annual deportations of low-priority undocumented immigrants.

She did acknowledge missteps. For example, many local and state officials believed that participation in Secure Communities was voluntary, but department officials later made it mandatory.

The document that the judge ordered released is expected to show details about how officials determined that involvement in Secure Communities was mandatory. The document had been withheld from a Freedom of Information Act request.

A government spokeswoman did not immediately return a message for comment Tuesday about the judge’s ruling.

Napolitano recently said that the Obama administration, which increasingly is under attack by both sides of the immigration issue for its handling of it,  is enforcing immigration laws in a more efficient and practical way than the Bush administration did.

She said policies inherited from the Bush administration "allowed as many resources, if not more, to be spent tracking down and deporting the college student as were spent on apprehending criminal aliens and gang members."

Under the Bush administration, Napolitano said, authorities would conduct large raids at companies without consistently punishing the employer or targeting immigrants who posed a threat.

"Public safety wasn't enhanced by these raids, and they sometimes required hundreds of agents and thousands of hours to complete," Napolitano said.

Now, the Obama administration is deporting record numbers of undocumented immigrants, she said, but is putting at the top of the line those who pose a public safety or national security threat.

One key tool for prioritizing who gets deported, she said, is Secure Communities program, which authorities use to check fingerprints collected from those held in local jails to identify and deport criminals and repeat immigration violators

"But as flawed as the beginnings of this program were, it has already helped accomplish a great deal toward ensuring that we use our enforcement resources where they do the most good," Napolitano said.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino