Prince William County officials filed a lawsuit against the U.S. Department of Homeland Security on Thursday, demanding information on the thousands of illegal immigrants the county has transferred to DHS.

The lawsuit asks DHS to comply with a Freedom of Information Act request filed last year that asked for the information on the 3,000 immigrants Prince William has sent to DHS since 2008. County officials said another 1,000 immigrants have been turned over since the FOIA request.

“It is frustrating that we as a local government must resort to suing the federal government to get information, which the public has a right to know and which is vital to our law enforcement efforts,” Prince William Chairman Corey A. Stewart (R-At Large) said. “I’m disappointed in the lack of cooperation from DHS.”

This is the second lawsuit Prince William has filed against DHS. Both were prompted by an August 2010 car accident in which Carlos Martinelly-Montano, 24, was allegedly driving drunk when he crashed into a car carrying three nuns, killing one.

Martinelly-Montano entered the country from Bolivia illegally when he was 8. He had been released by immigration authorities after two previous drunk-driving convictions and had been awaiting a deportation hearing.

The first lawsuit was filed in March after DHS failed to comply with a FOIA request that asked for information containing to Martinelly-Montano’s case and how he had been able to be released back into the community.

Homeland Security officials, who have spoken to The Post anonymously, have said they have looked into why Martinelly-Montano was released back into the community, however will not make those results public.

Martinelly-Montano has since been charged with felony murder, maiming resulting from driving drunk, involuntary manslaughter, driving on a suspended or revoked license and for driving while intoxicated for the third time in five years. He is scheduled to appear in Prince William Circuit Court in November.

Stewart said he is also frustrated with Congress for their lack of involvement. In February, county officials asked Congress to subpoena the information from DHS since the agency was not answering the county’s FOIA request. Rep. Frank R. Wolf (R-Va.), however, had already made a run for the information, sending a letter to Homeland Security Secretary Janet Napolitano in October.

“I am frustrated with the dismissive attitude of Congress, which has failed to compel DHS to turn over this information,” Stewart said. “Frankly, the Republicans in the House of Representatives are just as dismissive as the Obama administration on this issue.”