A Secret Service special agent who suggested she would rather face "jail time" than take "a bullet" for President Trump has raised serious legal problems for herself by mixing political activity with her sworn duty to protect the president, according to attorneys who specialize in this area of the law.

The Secret Service's Office of Professional Responsibility, its main internal ethics entity, has launched a formal investigation into the matter. That probe will likely focus on general misconduct — her threat not to carry out her most basic job responsibility to defend the president, as well as Hatch Act violations.

The Hatch Act bars executive branch staff, except the president, vice president and some other senior executive officials, from engaging in certain political activities. It doesn't carry jail time as a penalty, but she could be forced to resign under Hatch Act violations alone.

The Facebook posts that Kerry O'Grady wrote over the last seven months have sparked a firestorm in the Secret Service and broader federal law-enforcement community.

Several sources have told the Washington Examiner that agents are trained and re-trained about Hatch Act restrictions by legal experts during a required 16-week Special Agent Training Course.

The dereliction-of-duty issues raised by the post about not "taking a bullet" for Trump are obvious, but the potential Hatch Act violations are more complex because they depend on an interpretation of the law by the current Office of Special Counsel, the federal entity that prosecutes these cases.

Secret Service investigators are reportedly trying to determine if O'Grady wrote the Facebook posts during work hours or not. She wrote the post in which she talks about not "taking a bullet" for Trump late on a Sunday night in early October.

Several others she posted slamming Trump and members of his incoming team were written at various times over the course of the last seven months. Another set, including one post highlighting the women's march on Denver, she posted mid-day on Inauguration Day.

Cheri Cannon, an employment lawyer and managing partner for Tully Rinckey who represents federal law enforcement clients, said statements on O'Grady's personal Facebook site, especially any that appear to be made during work time, are "clearly a violation of the Hatch Act."

The Hatch Act is a limit on your First Amendment rights, which the Supreme Court has upheld as reasonable for some federal employees, Cannon said.

Senior employees like O'Grady, she said, are further restricted in their freedom of speech and political activities.

"My advice to people at that level is not to use Facebook," she said.

Brett Kappel, an attorney at Akerman firm specializing in election law and the Hatch Act, said if O'Grady was using work-time to write the Facebook posts, it would amount to an "unquestionable" violation of the Hatch Act, he said.

Kappel pointed to a Federal Election Commission, or FEC, lawyer who was forced to resign for posting pro-President Obama social media content from the Huffington Post from her workplace computer during work-time.

If O'Grady wasn't using work resources or work time, she could still be in legal trouble because of enhanced prohibitions Secret Service employees face under the law, he said.

Kappel said she was the was likely engaging in electioneering by endorsing Clinton and saying "I'm with Her," a Clinton slogan, in her post.

"Is what she posted express advocacy as defined by the [Federal Election Commission]?" he asked. "Writing 'I'm with Her' would probably do it because the FEC would consider that express advocacy because it's a main slogan of a presidential candidate."

Liz Newman, a partner at Kalijarvi, Chuzi Newman, Fitch, said interpretations of the Hatch Act are left up to the OSC, and unless the employee is posting during work hours, the devil is really in the details and how the current Special Counsel is interpreting the law.

"O'Grady should have concerns about the Hatch Act because she is going to fall under the heightened scrutiny," Newman said. But, she noted, in recent years the OSC was more concerned about federal employees who post social media links to campaigns or links to candidates' websites that then lead to website links soliciting funds or requesting donations.

"By using the social media link — then you yourself could be interpreted as soliciting the funds — that was the OSC's focus during the most recent election cycle," she said.

None of O'Grady's posts that the Washington Examiner reviewed link to official candidates' websites or fundraising materials. But evaluating O'Grady's legal problems based on the OSC's most recent track record is not the only factor to consider.

Trump, Newman said, could name a new special counsel in the next weeks and months who could more strictly interpret the Hatch Act.

The OSC issued an advisory opinion in late November further clarifying what would constitute a social media Hatch Act violation for "further restricted" employees, those subject to the enhanced rules.

"Such employees are prohibited from engaging in any political activity that is 'in concert' with a political party, partisan group, or candidate for political office," the OSC wrote in its opinion.

"To illustrate, while off duty and away from the workplace, a further restricted employee may post on social media his opinion about a presidential candidate, 'share' a friend's endorsement of a political party, or 'like' a candidate's Facebook page."

The employee, however, "cannot 'share' a post from a campaign Facebook page, 'retweet' a message from a political party, or 'like' a post that requests contributions for a candidate."

The rules are so complicated, Newman said, that "all of us who represent federal employees need to do a better job in educating people on what the rules are and the consequences and how to lawfully take a stand in ways that are going to have lesser consequences."