Housing and Urban Development Secretary Julián Castro addresses the Texas Democratic Convention in San Antonio last week. (AP/Eric Gay)

Julián Castro, the nation's housing secretary and one among a group of Democrats being vetted to serve as Hillary Clinton's Democratic running mate, urged calm among immigrants despite a deadlocked U.S. Supreme Court that invalidated a cornerstone of President Obama's immigration policy.

"This is a procedural setback, but this is not definitive," Castro said Thursday night in response to a court ruling that failed to revive Obama's stalled plan to shield millions of undocumented immigrants from deportation and give them the right to work legally in the United States.

The court’s action was about as bad as it could get for approximately 4 million undocumented immigrants estimated to be covered by Obama’s plan, which would have deferred deportation for those who have been in the country since 2010, have not committed any serious crimes and have family ties to U.S. citizens or others lawfully in the country.

"This is something that is deeply personal to millions of families in the United States — Latino and non-Latino," Castro told a small group of reporters Thursday night. "Folks often forget that undocumented immigrants come in every color, in every background from many different nationalities. But there are so many individuals who are now law-abiding. They're contributing to their community. They're working hard. They're strengthening our national economy, and people take it very personally because this creates tremendous uncertainty for them."

Despite the setback, Castro — one of four Latinos in Obama's Cabinet — defended the president's immigration record.

"The president's track record on this is very strong when you compare it to other presidents'," he said.

"While there is uncertainty, this is not the end," Castro added. "This will go back to a lower court and then go back to the Supreme Court in the end. Or hopefully there will be comprehensive immigration reform — but even if there is not in the immediate future, this administrative action will have another day in court."

Comments by Castro now carry greater political weight because he is being vetted by Clinton. Her campaign is reviewing the financial and professional backgrounds of Castro and Sens. Timothy M. Kaine (D-Va.) and Elizabeth Warren (D-Mass.). The ongoing review of potential candidates is likely to focus on other potential prospects, too, according to Democrats familiar with the process.

A former mayor of San Antonio, Castro made education reform a key part of his five-year tenure. Castro said he agreed with the Supreme Court's ruling upholding the use of affirmative action in university admission policies.

"I'm pleased that the court saw diversity in our nation's colleges and universities. It's an important point that diversity doesn't just help minorities. It helps all Americans who are going to have to work and contribute in a diverse United States, in a diverse world," he said. "There's a benefit for everybody for diverse colleges and universities. Affirmative action still does have a place today."

Castro spoke to reporters in Washington after addressing the annual conference of the National Association of Latino Elected and Appointed Officials, a nonpartisan group. He accepted a top achievement award from the organization, which was formally presented to him by Mexican Ambassador Carlos Manuel Sada Solana, a diplomat well-known to Hispanic political leaders because of his years of assignments at various Mexican consulates across the United States.

At a morning session of the conference, Arturo Vargas, NALEO's executive director, joked that his organization was helping vet potential VP picks for Clinton, because Castro, Rep. Xavier Becerra (D-Calif.) and Labor Secretary Thomas Perez — two other potential running-mate candidates — all addressed the conference Thursday.