Julián Castro, who breathed life into his low-performing campaign at the first Democratic debate in Miami in June, did it again Wednesday night in Detroit with a bravura performance that may provide the kind of lift in the polls he needs to secure a spot on the debate stages in September and October and keep his long-shot bid alive.

Castro, who at the Miami debate scolded fellow Texan Beto O’Rourke, who represented a border district in El Paso in Congress for three terms, to “do your homework” on immigration policy, upped the ante in Detroit by upbraiding former Vice President Joe Biden for not learning the lessons of history with his defense of former President Barack Obama’s record on deportations.

“Mr. Vice President, it looks like one of us has learned the lessons of the past and one of us hasn't,” Castro told Biden, for the second debate in a row creating a memorable exchange that crystallized his claim to being the progressive champion on immigration issues and burnishing his look as among the most polished and effective debaters in the Democratic field.

It was a stellar night for Castro that in its range — covering issues from police violence, to impeachment to water quality in Flint — and his poise, confidence and ready depth of knowledge, was even stronger than his well-received performance in Miami. It was a clutch performance. Castro, a former mayor of San Antonio who served as secretary of housing and urban development in the second Obama administration, is currently polling at 1 percent in the RealClearPolitics polling average. He needs to register at 2% in four significant polls if he is going to return to the debate stage in September and October. Failure to do so would effectively cripple his slow-building campaign.

At the Miami debate, Castro called O'Rourke out for not supporting Castro's call for decriminalization of all border crossings — making it a civil and not criminal violation. O'Rourke only wants to decriminalize crossings for those seeking asylum, which Castro argued was insufficient.

Wednesday, Castro was asked at the CNN debate if that didn't amount to an "open borders" policy.

"You know, if you elect me president, you're not electing me to follow," Castro replied. "You're electing me to lead. And open borders is a right-wing talking point, and frankly I'm disappointed that some folks, including some folks on this stage, have taken the bait."

"The only way that we’re going to guarantee that we don’t have family separations in this country again is to repeal Section 1325 of the Immigration Nationality Act. That is the law that this president, this administration is using to incarcerate migrant parents and then physically separate them from their children," Castro said.

"My immigration plan would also make sure that we put undocumented immigrants who haven't committed a serious crime on a pathway to citizenship, that we do a 21st century Marshall Plan with Honduras, El Salvador, and Guatemala, so that we can get to the root of this challenge, so people can find safety and opportunity at home instead of having to come to the United States," he said. "That's how we can be smarter, more effective and more humane when it comes to immigration policy."

Castro has not spared Obama, who Biden served as vice president, from criticism for his administration's mass deportation of more than three million people.

In the June debate, Biden, asked about the deportations said, “President Obama, I think, did a heck of a job.”

But Castro told reporters at an annual convention of the League of United Latin American Citizens earlier this month that he disagreed.

“I have learned the lessons of the past,” Castro said at the convention, foreshadowing Wednesday's exchange. “It seems like Vice President Biden hasn’t."

At Wednesday's debate, the question was put to Biden: "In the first two years of the Obama administration, nearly 800,000 immigrants were deported, far more than during President Trump's first two years. Would the higher deportation rates resume if you were president?"

"Absolutely not, number one," Biden replied. "Number two, everything landed on the president's desk but locusts. I found that Julián —- excuse me —  the secretary, we sat together in many meetings. I never heard him talk about any of this when he was the secretary."

Which gave Castro the opening he needed to reply.

"Yeah, first of all, Mr. Vice President, it looks like one of us has learned the lessons of the past and one of us hasn't," Castro told Biden.

"Let me begin by telling you — let me just start out by answering that question. My immigration plan would also fix the broken legal immigration system, because we do have a problem with that," Castro said.

"I agree," Biden said.

"Secondly, the only way that we're going to guarantee that these kinds of family separations don't happen in the future is that we need to repeal this law," Castro said. "There's still going to be consequences if somebody crosses the border. It's a civil action. Also, we have 654 miles of fencing. We have thousands of personnel at the border. We have planes, we have boats, we have helicopters, we have security cameras. What we need are politicians that actually have some guts on this issue."

On impeachment, when Colorado Sen. William Bennet said he feared that if it leads to "an acquittal by Mitch McConnell in the Senate, which it surely would ... then President Trump would be running saying that he had been acquitted by the United States Congress," Castro countered that, "I really do believe that we can walk and chew gum at the same time."

Castro argued that if the House doesn't impeach Trump, the president will say,"`they didn't go after me there because I didn't do anything wrong.' Conversely, if Mitch McConnell is the one that lets him off the hook, we're going to be able to say,`Well, sure, they impeached him in the House, but his friend, Mitch McConnell, Moscow Mitch, let him off the hook.,'" using a critical sobriquet for McConnell coined by Joe Scarborough, host of MNSBC's Morning Joe, and applied to the majority leader for his blocking stronger election security measures in the wake of Russia’s interference in the 2016 election.

Bennet was persuaded.

"I don't disagree with that," he said. "You just said it better than I did. We have to walk and chew gum at the same time. It is incredibly unusual for members of Congress to be able to do that. And I'm glad that Secretary Castro has the ambition."

In his opening statement, Castro said, "I grew up with a single mom in a poor neighborhood. But like many of you, I don't want to make America anything again."

"I don't want us to go backward," he said. "We're not going back to the past. We're not going back where we came from. We're going to move forward. We're going to make America better than it's ever been in the years to come. Let's do that together."

In his close, Castro said, "Donald Trump has not been bashful in his cruelty. And I'm not going to be bashful in my common sense and compassion. I believe that we need leadership that understands that we need to move forward as one nation with one destiny."