Texas Democrat Julian Castro formally launched his White House bid on Saturday, entering as a dark horse candidate in a likely crowded field vying to challenge US president Donald Trump in the November 2020 election.

Mr Castro (44) is a former San Antonio mayor and top US housing official. He is the grandson of a Mexican immigrant and would be the first Hispanic elected president. He served as secretary of housing and urban development under former president Barack Obama and has long been viewed as a rising star in the party. He will seek to position himself as a political outsider with liberal credentials.

“I’m running for president because it’s time for new leadership. Because it’s time for new energy,” said Mr Castro at his campaign launch. “And it’s time for a new commitment to make sure that the opportunities I’ve had are available for every American.”

One of Mr Castro’s first stops as a candidate will take place on Monday in Puerto Rico, where he will attend an event hosted by the liberal Latino Victory Fund.

He made his announcement at Plaza Guadalupe, a landmark in San Antonio’s sprawling west side Mexican-American barrio, a neighborhood of neat, brightly painted wood framed homes, many on tiny lots and festooned with white plaster Catholic statues.

In summarising his political positions, Castro endorsed “Medicare for all”, which would in effect create a national healthcare plan by allowing anyone to join the public healthcare system. That policy point is likely to divide Democrats in the primary, with more moderate candidates favouring a less drastic approach.

He used his launch to repeat support of the Black Lives Matter movement and also spoke of the pressing need to address climate change.

Mr Castro, whose grandmother was born in Mexico, has sought to use his family’s personal story to criticise Mr Trump’s border policies – including railing against the president by name in his launch speech.

“Yes, we must have border security, but there is a smart and humane way to do it. And there is no way in hell that caging children is keeping us safe,” he said.

Supporters hold signs aloft as Julian Castro announces his candidacy. Photograph: AFP/Getty Images

Supporters back Julian Castro as he announces his candidacy for the White House in 2020. Photograph: AFP/Getty Images

Mr Castro is the second candidate to formally launch a campaign. Former US congressman John Delaney has been running for more than a year. Senator Elizabeth Warren of Massachusetts has formed an exploratory committee and congresswoman Tulsi Gabbard said on Friday that she will run for the White House.

More than a dozen potential Democratic candidates are exploring a possible run in 2020. Moderates and progressives in the party have been debating about how to best challenge Mr Trump, the likely Republican nominee.

Some Democrats believe an establishment figure who can appeal to centrist voters is the way to win back the White House. Others contend a fresh face is needed to energise the party’s increasingly left-leaning base.

Mr Castro has been out of the political spotlight for the past two years, at a time when politics has become all-consuming across America. He was considered on the short list to be Hillary Clinton’s running mate in the 2016 election.

His twin brother, Joaquin Castro, is a member of the US House of Representatives from Texas. Joaquin Castro’s position on the House Intelligence Committee has made him a frequent public critic of the president. – Reuters