The city Health Department encouraged employees to leave work Thursday and attend a rally condemning the Supreme Court’s split decision to block President Obama’s immigration plan, The Post has learned.

An e-mail sent to DOH workers informed them of the City Hall event hosted by Mayor de Blasio and urged that they participate.

“Staff who are able to attend are encouraged to do so,” the e-mail read. “If you cannot attend, but would like to watch the rally, it will be live-streamed.”

State Conservative Party Chairman Mike Long said the e-mail went too far.

“It’s crossing the line. It’s a rip-off of taxpayers,” he said. “You shouldn’t be using city employees on the payroll to attend a rally.”

The Health Department insisted through a spokesman that what it did was within its mission.