U.S. Secretary for Housing and Urban Development Marcia Fudge has come under fire for potentially violating a law that bars White House officials from engaging in campaign-related activities.

The former Ohio Democratic Rep. answered a question in the White House briefing room this week about who may potentially fill the seat of Sen. Rob Portman, R-Ohio, who will not seek reelection in 2022, as first reported by The Washington Post. She also advocated for Democrats in the race.

 "Well, I have two friends that are thinking about it," Fudge said. "Tim Ryan, of course, is thinking about that, understand and really is thinking about it. I mean, I think we're going to put a good person in that race no matter who we choose. But they're both friends. I think we have a good shot at it. I know people have written off Ohio. I haven't written off Ohio. I believe we can win the Senate race."

The law in question is the Hatch Act, which precludes federal employees from using their official authority to influence or interfere with an election.

MARCIA FUDGE: WHAT TO KNOW ABOUT BIDEN'S HUD SECRETARY PICK

Fudge did decline to answer a question about the special election to fill her vacated seat.

An official with the Office of the Special Counsel explained to The Post on the condition of anonymity what would be prohibited by the law.

"If there is a government employee speaking from the White House briefing room and is there in their official capacity, then they're prohibited from engaging in political activity while they're speaking," the official told the publication.

Fudge acknowledged in a statement that she should have stuck with her "first instinct," which was not to answer the question.

 "When I was discussing getting relief to the American People and the American Rescue Plan from the briefing room on Thursday, I answered a question from a reporter related to Ohio politics," Fudge said in a statement on Friday night. "I acknowledge that I should have stuck with my first instinct and not answered the question. I take these things seriously and I want to assure the American people that I am focused on meeting the needs of our country."

CLICK HERE TO GET THE FOX NEWS APP

Penalties for violations include removal from federal service, reduction in grade, suspension, reprimand and a civil penalty of as much as $1,000.

Fudge is the first Black woman to head up HUD in decades. She represented Ohio in the House from 2008 until she vacated her seat for her administration role.

She was sworn in last week and attended the press conference with Press Secretary Jen Psaki on Thursday to discuss the American Rescue Plan.

As previously reported by Fox News, the Office of the Special Counsel recommended that President Donald Trump fire White House Adviser Kellyanne Conway for violating the Hatch Act on "numerous occasions." Conway was not fired.