Updated

A federal judge has blocked efforts to bring back to U.S. Capitol grounds a controversial painting that depicts a police officer as a pig.

David Pulphus, a student artist from Missouri, and Rep. William Clay, his Democratic congressional representative, had sued Architect of the Capitol Stephen Ayers for removing the painting in January amid a showdown with law enforcement groups and Republican lawmakers who opposed the “art.”

U.S. District Judge John D. Bates said in his decision that the government has used its editorial discretion in the selection and presentation of the piece.

As a result, it's engaging in "government speech" and the plaintiffs have no First Amendment right to display the painting.

Leah J. Tulin, a lawyer representing Pulphus and Clay, says they are likely to appeal.

The painting appeared to show a pig in a police uniform aiming a gun at a black wolf holding a sign that says, “STOP KILL.”

Above the scene, two birds -- one black, one white -- fight, and beside them, a black protester holding a scale of justice is crucified.

Law enforcement groups had strongly objected to the painting’s display on the Capitol complex grounds, with one group calling it “reprehensible, repugnant and repulsive.”

The art work was part of an annual contest sponsored by Clay, D-Mo., and is said to be a symbolic representation of injustice, inequality and the unrest in Ferguson following the shooting of an unarmed black man by a white police officer in 2014.

The painting had hung in a tunnel leading to the Capitol for more than seven months before it became a lightning rod of controversy.

Rep. Duncan Hunter, R-Calif., took the painting down and returned it to Clay’s office last year. Hunter argued that it was inappropriate. Clay put it back up.

Republicans eventually issued a formal complaint that led to the architect of the Capitol removing it in January.

The Associated Press contributed to this report.