Department of Housing and Urban Development (HUD) Secretary and possible Democratic vice presidential pick Julián Castro violated the federal Hatch Act, according to the U.S Office of Special Counsel.

The OSC’s investigators concluded in a report sent to President Obama Monday that Castro illegally advocated for and against presidential candidates during an April 4 interview with Yahoo News. The Hatch Act prohibits federal employees from making partisan remarks when using their official title or discussing agency business.

“According to OSC’s report, Secretary Castro’s statements during the interview impermissibly mixed his personal political views with official agency business despite his efforts to clarify that some answers were being given in his personal capacity,” an OSC statement said.

Castro expressed his support for former Secretary of State Hillary Clinton during the Yahoo News interview and claimed that presumptive Republican presidential nominee Donald Trump is unprepared to be president.

“Now taking off my HUD hat for a second and just speaking individually, it is very clear that Hillary Clinton is the most experienced, thoughtful and prepared candidate for president that we have this year,” according to OSC.

The OSC announcement comes as the Republican National Convention convened in Cleveland and speculation grows about who Clinton will pick for the Democratic National Convention that begins in Philadelphia July 25. (RELATED: HUD Cleared To Tell Americans Where To Live)

Castro told OSC that he believed when he did the interview that he could legally state his political opinions as his own, saying “when an error is made — even an inadvertent one — the error should be acknowledged. Although it was not my intent, I made one here.”

OSC head and Special Counsel Carolyn Lerner said the Castro report is timely.

“As the upcoming presidential election approaches, this report offers an opportunity to deter violations by reminding federal employees of the Hatch Act’s restrictions,” Lerner said in a letter attached to the report to Obama.

The President alone can decide whether to take any disciplinary action in such a case, but the White House released a statement saying the chief executive considers the matter resolved with Castro’s admission of error.

Follow Kathryn on Twitter

Send tips to katie@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.