Updated

The Supreme Court will decide if the First Amendment covers a public employee fired or demoted over a boss’ misperception that the employee was backing a political candidate.

The court last week hashed out the free speech ramifications of just such a scenario in the case of a New Jersey cop who claims his bosses demoted him after mistakenly assuming he was backing a challenger in a local mayoral race.

Jeffrey Heffernan maintains his demotion from detective to a foot post in 2005 was political payback by superiors in the Paterson Police Department. He had been spotted with a campaign sign of a candidate running against the mayor who had the support of the police chief.

“I was picking up a sign for my mother, and that’s all I was doing,” Heffernan has said, according to the Bergen Record.

The justices agreed during arguments Tuesday that government officials cannot retaliate against public employees who exercise their rights under the First Amendment. But there was vigorous debate over what happens when public officials act based on a mistaken belief that an employee is involved in political activity.

"There's no constitutional right not to be fired for the wrong reason," Associate Justice Antonin Scalia told Heffernan’s attorney Mark Frost.

Frost said what mattered was that his client's superiors were trying to suppress his political speech. He said the fact that Heffernan was not campaigning doesn't matter since the government was motivated by the assumption he was.

By the end of the hour-long give-and-take it seemed Heffernan would have had a better First Amendment case if he had endorsed the mayor’s challenger, The Washington Post reported.

“The First Amendment talks about abridging freedom of speech, and I thought the case came to us on the proposition that he wasn’t engaging in speech at all,” Chief Justice John G. Roberts Jr. said, adding: “I’m not sure how he can say his freedom of speech has been abridged.”

On the other hand, Justice Elena Kagan said under the city's rationale, an elected Democrat who comes into office can't demote or fire known Republicans but he could get rid of anyone "who is just politically apathetic."

Heffernan initially won a $105,000 jury verdict against the city, but the judge later tossed the decision and recused himself due to a conflict of interest. A new judge dismissed the case and a federal appeals court affirmed. He retired from the force in 2011.

Heffernan’s lawyers asked the justices to overturn the appeals court decision.

Arguing for the city, lawyer Thomas Goldstein said the government's motive doesn't matter — it can't violate First Amendment rights unless a person is actually exercising those rights.

"It's a very sympathetic claim, OK? Goldstein said. "I get the fact that we are very concerned that public employees not be transferred or demoted, but we have other laws and other regimes that fill that gap."

A decision is expected by the end of the Supreme Court’s term in June.

The Associated Press contributed to this report.