The Hatch Act, a relatively obscure law governing political engagement by federal employees, has people clucking this week, amid controversy over FBI director James Comey’s letter to lawmakers about potential new evidence in Hillary Clinton’s email scandal.

Some say Comey may have violated the Hatch Act. Others have countered that it’s impossible if President Barack Obama can hit the campaign trail for Hillary Clinton.

What’s going on here? Let’s start with some background.

The Comey letter

On Oct. 28, Comey sent a letter to members of Congress saying that the agency would look into a potential new trove of Hillary Clinton emails found in the course of an unrelated investigation, which turned out to be the sexting probe of former Rep. Anthony Weiner, D-N.Y. Weiner is married to senior Clinton aide Huma Abedin, though they are currently separated.

The letter came as a surprise -- and an unwelcome one for Clinton -- because three months earlier, Comey had announced that the investigation of Clinton’s emails would not result in an indictment.

Comey sent the letter to lawmakers and said it was necessary to update his prior testimony to Congress to account for new facts about the investigation. He said it wasn’t clear if the new emails would change the initial findings.

But critics -- including but not limited to supporters of Clinton -- decried Comey’s letter as casting aspersions on Clinton, with little supporting detail, just 11 days before the election.

Reid’s accusation against Comey

The Hatch Act, which was passed in 1939, "limits certain political activities of federal employees," the office that enforces the law explains on its website. "​The law’s purposes are to ensure that federal programs are administered in a nonpartisan fashion, to protect federal employees from political coercion in the workplace, and to ensure that federal employees are advanced based on merit and not based on political affiliation.​​​​ ​"

Among the fiercest critics of Comey’s decision to send the letter was retiring Senate Minority Leader Harry Reid, D-Nev. He invoked the Hatch Act in his own letter to Comey, saying, "Through your partisan actions, you may have broken the law."

In his letter, Reid noted that Justice Department employees are subject to the Hatch Act.

"The clear double-standard established by your actions strongly suggests that your highly selective approach to publicizing information, along with your timing, was intended for the success or failure of a partisan candidate or political group," Reid wrote.

Ultimately, a decision as to whether the act was violated would be in the hands of the Office of Special Counsel, an independent agency tasked with policing Hatch Act violations.

But experts told us it’s not as clear as Reid suggests that Comey would have violated the act by sending the letter to lawmakers. The law is focused on activity directed toward the success or failure of political candidates, but it is more often aimed at extracurricular activities carried out by federal employees rather than deciding whether carrying out official activities constitutes aid to one party or the other.

At the same time, Comey’s senior position would not offer much protection. As recently as four years ago, Kathleen Sebelius, then the Secretary of Health and Human Services under Obama, was found to have violated the Hatch Act when she made "extemporaneous partisan remarks" during a speech in which she was appearing in an official capacity.

The determination was made public, but Sebelius was not punished. The event was reclassified from "official" to "political" after the fact -- events classified as "political" allow federal officials more leeway in speaking about politics -- and Sebelius and her department reimbursed the treasury for the cost of the trip..

Comey’s letter may or may not have been wise, but "at best it’s a questionable Hatch Act violation," said Brett Kappel, an attorney who specializes in political ethics with the law firm Akerman.

How valid is the Obama-Comey comparison?

Regardless of the argument’s merits, Reid’s letter drew counter-fire from Comey’s defenders.

Rep. Trey Gowdy -- the Republican chairman of the House Benghazi panel, which first came across evidence of Hillary Clinton’s private server -- appeared on MSNBC’s Morning Joe on Oct. 30. During that interview, he said, "President Obama is actively campaigning right now for a candidate for president, and that doesn’t violate the Hatch Act. So how Jim Comey supplementing his record before Congress violates the Hatch Act is just laughable."

Another MSNBC guest later the same day -- Stanley Pottinger, a former Justice Department official in the Richard Nixon and Gerald Ford administrations, as well as briefly during the presidency of Jimmy Carter -- made a similar comparison.

In reality, Obama and Comey have completely different statuses under the Hatch Act.

"The provisions of the ‘Hatch Act’ apply (in one degree or another) to all federal employees, other than the President and Vice President, in the executive branch of the federal government," the Congressional Research Service has written.

In other words, the fact that Obama is able to campaign openly for Clinton is irrelevant for determining whether Comey may have violated the act. Comey, as a political appointee, is included under the act, while Obama, as president, is not.

Amanda Gonzalez, a spokeswoman for Gowdy, told PolitiFact that the congressman "did not misspeak — he said, ‘President Obama is actively campaigning right now for a candidate for president, and that doesn’t violate the Hatch Act.’ That is 100 percent true." She noted that Gowdy also mentioned the tarmac meeting between Loretta Lynch and former President Bill Clinton as not violating the Hatch Act.

However, specialists in political ethics and law said that equating Obama and Comey under the Hatch Act is misleading.

Kenneth A. Gross, a specialist in political disclosure and ethics at the law firm Skadden, said that Gowdy "misspoke."

"The Hatch Act does not apply to the president -- he or she might have trouble running for reelection if it did," Gross said. "The presidential reference is inapt."