Former Housing and Urban Development Secretary Julián Castro said Tuesday that he wants to follow former President Obama's lead on balancing fatherhood with the presidency if he's elected.

"I think that President Obama set a very good example … he would make time just about every night to spend dinnertime with his family before retiring to his study," Castro, who is running for president, said on BuzzFeed News's "AM2DM."

"He put that effort into being a good father, and that's the kind of president that I would want to be, who was able to make time, to be with my family."

Castro, 44, has been married since 2007 and has two kids.

Castro's comments come after former Rep. Beto O'Rourke Beto O'RourkeJimmy Carter says his son smoked pot with Willie Nelson on White House roof O'Rourke endorses Kennedy for Senate: 'A champion for the values we're most proud of' 2020 Democrats do convention Zoom call MORE (D), another Texas politician running for the Democratic Party's nomination in 2020, faced criticism for how he has talked about being a parent.

ADVERTISEMENT

O'Rourke joked in March that his wife has been raising their children "sometimes with my help." O'Rourke faced sharp backlash for the remarks and said soon after the comments that he would be "more thoughtful" when talking about his family.

"My ham-handed attempt to try to highlight the fact that Amy has the lion's share of the burden in our family — that she actually works but is the primary parent in our family, especially when I served in Congress, especially when I was on the campaign trail — should have also been a moment for me to acknowledge that that is far too often the case, not just in politics, but just in life in general. I hope as I have been in some instances part of the problem, I can also be part of the solution," he said.