Julián Castro didn't get as much airtime as other Democratic presidential contenders in their debate on Wednesday, but when he did speak, he used the time to press his case for remaining in the race and making it to the next debate next month.

Although he had about half the time as Joe Biden, the front-runner in the polls, Castro created a moment for himself early in the debate when he slapped back at the former vice president as they tussled over immigration.

Biden took a shot at Castro's call to decriminalize illegal border crossings, alleging that Castro, when he was housing secretary in the final two years of the Obama administration, never publicly objected to the record number of deportations then taking place.

“I never heard him talk about any of this when he was secretary,” said Biden, who was vice president for all of Barack Obama's two terms.

Castro punched back. “It looks like one of us has learned the lessons of the past, and one of us hasn’t,” he said to applause.

The exchange showed a fierceness Castro hasn't always been quick to display on the campaign trail.

“He definitely showed backbone in pressing Biden on the need for guts on immigration,” said Larry Gonzalez, a Democratic strategist at the Washington-based Raben Group lobbying firm.

Castro's measured demeanor has led some political analysts to question whether he's up to challenging other Democrats or President Donald Trump face-to-face, but his two debate performances so far have allayed some of the concerns.

Amanda Rentería, who served as national political director for Hillary Clinton’s 2016 presidential campaign, said the “past versus the future” was one of the takeaway themes of Wednesday’s debate, and it was Castro who framed it.

“The minute he said it, it shaped everybody’s answers,” Rentería said.

Castro dug in a little deeper with his dig at Biden, saying the border is loaded with fencing, helicopters, security cameras and more and “what we need are politicians that actually have some guts on this issue.”

Biden pushed back, saying he “has guts enough" to say Castro's decriminalization proposal " doesn’t make sense.”

But even with that pushback from Biden, Castro may have scored points, said Laura Barberena, a San Antonio-based political communications and campaign strategist.

“Biden spent precious debate time to take a punch," Barberena said of Castro. "The simple fact that Biden did that should indicate that he is solidly in the ring.”

“Julian’s team needs to capitalize on this and create social media content that highlights Biden’s punch," she added.

As the front-runner in the polls, Biden is the lead target of other Democrats, and after the first debates in Miami, another Biden-Kamala Harris showdown was expected at the debates this week in Detroit.

But the fact that Castro got his moment is "a win, and the nature of debates is, for good or bad, that moment has to come through confrontation," James Aldrete, a political communications consultant who worked on the Obama and Clinton campaigns, said.

Castro had a string of other “moments” in the debate.

He was the only candidate to mention Puerto Rico, whose residents held massive demonstrations to force the resignation of Gov. Ricardo Rosselló after a scandal involving leaked chats in which he, among other things, mocked the thousands killed by Hurricane Maria and its aftermath.

“Just a few days ago, we were reminded and inspired by our fellow Americans in Puerto Rico that public service is not fundamentally about any of us. It's about you and your family,” Castro said.

Castro also called Trump a “racist,” mentioned the layoffs of General Motors workers, ticked off the names of victims killed in police confrontations, gave a shoutout to Barack Obama for his economic legacy and called for the firing of New York City police Officer Daniel Pantaleo, who put Eric Garner in a fatal chokehold but is not facing federal charges.

“Eleven different times Eric Garner said he could not breathe. ... That police officer should be off the street,” Castro said to cheers from the debate audience in Detroit, where 83 percent of the population is black.

In addition, during his approximately 10 minutes of airtime, Castro managed to sprinkle in some of his policy proposals on education and immigration and remind the audience he was the first candidate to call for Trump's impeachment.

He also set Twitter abuzz by invoking “Moscow Mitch,” the nickname Democrats have been calling Senate Majority Leader Mitch McConnell all week for blocking election security legislation, inspiring a Twitter hashtag, much to McConnell’s disliking.

Dropping “Moscow Mitch” into the debate was “a made-for social media moment,” Gonzalez said.

Julian Castro just called @senatemajldr MOSCOW MITCH, YESSSSSSSSSS!!!!!!!!



😂😂😂😂😂😂😂😂😂😂😂



👏👏👏👏👏👏👏👏👏👏👏 — Ricky Davila (@TheRickyDavila) August 1, 2019

Castro ducked criticism that other candidates endured for taking a more moderate approach on health care coverage. Some Democrats want to move quickly to a "Medicare for All" coverage scheme, while others want to protect the private coverage some Americans have through their employers or unions.

“I want to strengthen Medicare for the people who are on it and then expand it to anybody who wants it,” Castro said. “I also believe, though, that if somebody has a private health insurance plan that is strong that they want to hold on to, they they should be able to do that.”

Will he get a post-debate bump?

Castro, who also served as mayor and a city council member in San Antonio, had been struggling as a candidate until his first debate performance in Miami.

There, he pummeled fellow Texan Beto O’Rourke on immigration, too. His fundraising and media attention surged, but he still lags behind other candidates in polling and campaign contributions.

Castro still needs a bump from Wednesday night to get him to the Sept. 12-13 debates in Houston, in his home state of Texas. He needs to poll at least 2 percent in one more poll to secure a spot.

After the debate, in the spin room, Castro told NBC News that Democrats are not going to defeat Trump with a traditional candidate, but with “somebody who can excite a new generation of people out there, a new coalition, the way Barack Obama was able to in 2008."

He said he’s doing that by raising issues others aren’t. “I was the first to propose a plan to address the issues that we saw in Flint, the first to propose a policy on indigenous communities, the first to propose policy on police reform, the first to visit Puerto Rico and I mentioned that — our friends in Puerto Rico tonight,” he said.

“I am building a diverse coalition of people so that we can win, not only in states like Michigan, but also across the country and beat Trump in 2020.”

Vaughn Hillyard contributed reporting.

Follow NBC Latino on Facebook, Twitter and Instagram.