WASHINGTON — An independent government agency recommended on Thursday that President Trump fire Kellyanne Conway, his White House counselor, for repeated violations of an ethics law barring partisan politics from the federal workplace.

In a letter accompanying a report to Mr. Trump, the agency called Ms. Conway a “repeat offender” of the Hatch Act, which prohibits federal employees from engaging in campaign politics at work, saying that her flagrant defiance of the law justified her dismissal from the White House.

“As a highly visible member of the administration, Ms. Conway’s violations, if left unpunished, send a message to all federal employees that they need not abide by the Hatch Act’s restrictions,” said the letter to the president, signed by Henry J. Kerner, the head of the agency. “Her actions erode the principal foundation of our democratic system — the rule of law.”

[Read more: What is the Hatch Act, and has anyone ever been fired for violating it?]

The agency, called the Office of Special Counsel, enforces the Hatch Act and is not related to Robert S. Mueller III, the former special counsel who investigated Russia’s interference in the 2016 election. Despite its official mission, the office has no power to force Ms. Conway’s dismissal, and the White House quickly made clear that Mr. Trump would not follow its suggestion.