Gov.Tim Walz of Minnesota is shown during a House committee hearing March 4 at the U.S. Capitol in Washington, D.C. On Monday, a federal judge threw out Justice Department subpoenas issued to Walz and other Democratic officials, saying they were unconstitutional. File Photo by Annabelle Gordon/UPI | License Photo

June 22 (UPI) -- A federal judge on Monday threw out multiple Justice Department subpoenas issued to Minnesota Gov. Tim Walz and other officials, saying they are unconstitutional and part of attempts to harass President Donald Trump's political opponents.

The subpoenas sought to force Walz and others to turn over records and information as part of a federal investigation into whether Democratic officials obstructed the Trump administration's immigration crackdown through public resistance. Many officials spoke out about the crackdown, which drew widespread protests and resulted in two deaths of U.S. citizens at the hands of Immigration and Customs Enforcement agents and the arrests of more than 4,000 undocumented immigrants.

District Judge Patrick Schiltz said the subpoenas were "part of an unconstitutional effort to coerce Minnesota officials into assisting the federal government with enforcing civil immigration laws and to harass and retaliate against them for failing to do so," CNN reported.