Julián Castro, the former mayor of San Antonio who served as housing secretary under President Barack Obama, said Thursday he is suspending his candidacy and ending his effort to become the nation’s first Latino president.

“I’m so proud of the campaign we’ve run together,” Castro, 45, said in a video released by his campaign. “We’ve shaped the conversation on so many important issues in this race, stood up for the most vulnerable people and given a voice to those who are often forgotten.”

Castro, who did not qualify for the past two Democratic debates because he failed to rank high enough in pre-debate polls, noted in the video that there was only a month left before the Iowa caucuses, which will be held Feb. 3.

“I have determined that it simply isn’t our time,” he said. “To all who have been inspired by our campaign, especially our young people, keep reaching for your dreams — and keep fighting for what you believe in.”

Throughout his campaign, Castro cultivated a reputation as a liberal Democrat who focused his attention on the poor and other marginalized communities. His first trip after announcing his candidacy was to Puerto Rico, and he notably called for decriminalizing the act of crossing the border without legal permission.

Soon after Castro announced he was leaving the race, several former opponents chimed in to praise him for “sticking up for underrepresented communities,” “proposing bold and progressive plans” and speaking up for “the most vulnerable.”

Castro’s exit also means he is the latest candidate of color to leave a Democratic field that had started out as historically diverse. In recent weeks, Castro grew more vocal about why Iowa voters should not go first in the primary process, arguing that the state — whose population is 90 percent white — is not representative of the country’s diversity.

“I’m not interested in changing the rules of the game in the middle of the game,” Castro said at a December town hall in Des Moines. “What I am interested in is changing for the future.” The Democratic National Committee should rethink its procedures, he added.

Castro had announced his bid last January in San Antonio, saying that “no front-runners” are born in his neighborhood. His mother, Rosie, is a political activist, and his twin brother, Joaquin, is a U.S. congressman. He was the youngest member of Obama’s Cabinet when confirmed to lead the Department of Housing and Urban Development in 2014, and he was considered by Hillary Clinton as her running mate in 2016.

But despite the growing political strength of Latino voters and the country’s polarization over immigration in the Trump era, Castro’s campaign never truly caught on, and he never rose into the upper ranks of the Democratic contenders.

In a year of impassioned politics, Castro’s candidacy was overshadowed by figures like Sen. Bernie Sanders (I-Vt.), a democratic socialist with a devoted following, and former vice president Joe Biden, who has spent decades building a political base.

Castro also made no secret of his frustration over the media attention received by Pete Buttigieg, the former mayor of South Bend, Ind.

“I was mayor of a city that’s 14 times larger than South Bend,” Castro said in an appearance on “The Daily Show” in November. “In fact, we could almost fit South Bend in our Alamodome in San Antonio.”

Castro’s campaign sent an email Oct. 21 saying that he would drop out if he failed to raise $800,000 by the end of the month, mimicking a move made by Sen. Cory Booker (D-N.J.) the previous month.

“We do not see a path to victory that doesn’t include making the November debate stage,” Castro campaign manager Maya Rupert said in a statement at the time. “Without a significant uptick in our fundraising, we cannot make that debate.”

Like Booker before him, Castro did ultimately hit that fundraising goal, but he did not achieve the required polling strength to make the stage. To qualify, candidates needed to get donations from at least 165,000 people and hit 3 percent in at least four DNC-approved polls or 5 percent in two polls in early-voting states.

Castro didn’t hit the mark in any qualifying polls.

It is often tough for candidates to stay viable once they no longer qualify for debates. In the first Democratic debate last summer, 20 candidates took the stage, and party leaders have faced pressure from voters to winnow the field.

Tom Steyer, a billionaire investor who has spent more than $100 million on his campaign, said Thursday that Castro had been a powerful addition to the race, and reiterated what he had urged after Sen. Kamala D. Harris (D-Calif.) ended her campaign last month: that the Democratic Party should alter its rules to allow more candidates onto the debate stage.

“I don’t like it when candidates drop out,” Steyer said.

David Weigel contributed to this report from Iowa.