Gregory Korte

USA TODAY

Housing Secretary Julian Castro violated federal law when he expressed support for Hillary Clinton's candidacy in an interview with Yahoo News in April, an investigation has found.

Castro, who Clinton has mentioned as a possible vice presidential running mate, told reporter Katie Couric in the interview that "Clinton is the most experienced, thoughtful, and prepared candidate for president that we have this year.”

That violated the Hatch Act, according to an investigative report submitted to President Obama Monday by the Office of Special Counsel. That law, first passed in 1939, forbids anyone in the executive branch — other than the president or vice president — from using his or her official position to engage in political activity.

Castro preceded his support for Clinton by saying he was "taking off my HUD hat for a second and just speaking individually." But the Office of Special Counsel, which enforces the Hatch Act, said Castro "impermissibly mixed his personal political views with official government agency business."

Castro admitted the error.

"At the time, I believed that this disclaimer was what was required by the Hatch Act. However, your analysis provides that it was not sufficient," Castro said in a response to the Office of Special Counsel. "When an error is made — even an inadvertent one — the error should be acknowledged. Although it was not my intent, I made one here."

Because Castro is a cabinet secretary, the investigative report goes directly to the president for possible disciplinary action. The White House suggested Monday that it considers the situation resolved.

"Secretary Castro has acknowledged the inadvertent error he made in answering an interview in question, and has taken full responsibility for ensuring that such errors do not occur again," White House Deputy Press Secretary Jennifer Friedman said in a statement. "The secretary takes the Hatch Act very seriously and he has committed to taking steps to ensure understanding and compliance with the Hatch Act throughout the Department of Housing and Urban Development."