President Obama won't discipline Housing and Urban Development (HUD) Secretary Julián Castro for violating a rule prohibiting federal officials from making personal political statements while presenting themselves in an official capacity.

The White House confirmed on Tuesday that Castro, who has been mentioned as a possible running mate for presumptive Democratic presidential nominee Hillary Clinton Hillary Diane Rodham ClintonBiden leads Trump by 36 points nationally among Latinos: poll Democratic super PAC to hit Trump in battleground states over coronavirus deaths Battle lines drawn on precedent in Supreme Court fight MORE, won't face any punishment after he apologized for breaching the Hatch Act during an April interview with Yahoo News's Katie Couric.

ADVERTISEMENT

“I think, to his credit, Secretary Castro acknowledged the mistake that he made," said White House press secretary Josh Earnest.

"He owned up to it, and he's taken the necessary steps to prevent it from happening again," Earnest told reporters.

"I think that's the expectation that people have when you make a mistake, particularly in a situation like this."

The U.S. Office of Special Counsel (OSC) released a report on Monday concluding that Castro has shared his personal political views of the presidential candidates, including Clinton and presumptive Republican presidential nominee Donald Trump Donald John TrumpBiden leads Trump by 36 points nationally among Latinos: poll Trump dismisses climate change role in fires, says Newsom needs to manage forest better Jimmy Kimmel hits Trump for rallies while hosting Emmy Awards MORE, while acting in an official capacity.

During the interview, Castro discussed HUD programs, professed his support for Clinton and called Trump unprepared to be president.

“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,” the OSC report said.

Castro did the interview in HUD’s broadcast studio in Washington.

In a letter sent to the special counsel and the president, Castro said, "When an error is made — even an inadvertent one — the error should be acknowledged.

"Although it was not my intent, I made one here," he said.