HOUSTON — Former Housing Secretary Julián Castro was looking for a boost to his presidential campaign when he took a jab at front-runner Joe Biden in a clash over health care in Thursday night's debate, but the remark has since made him the target of heated criticism over whether he took a disrespectful shot at an elder candidate.

"Are you forgetting what you said two minutes ago?" Castro asked Biden, making many viewers wonder whether he was questioning the former vice president's mental acuity. "Are you forgetting already what you said just two minutes ago?"

Following the debate, Biden's advisers hit hard on Castro's comments, saying he hadn't learned the lessons of previous attacks on Biden — that they backfire. "It was a cheap shot and a question Castro should answer,” said Anita Dunn, a Biden adviser.

Maya Rupert, Castro's campaign manager, said the campaign was concerned about the backlash and disputed the suggestion that Castro was implying something about Biden's fitness. She said Castro would have offered the same critique to anyone who did what Biden did, "making the mistake and then doubling down and saying he didn't say what he just said."

"Anyone who reverses their position like that on stage in real time would have been open to that type of criticism on stage," Rupert said. "You are literally forgetting what you said. The idea that he crossed some line, I don't think that's fair."

The campaign also thought it was a fair strike at Biden's health insurance plan and whether it covers people who lose their health care when they lose their job. NBC News took a close look at the exchange, finding the two candidates were largely talking past each other. Castro articulated a real divide on policy, but Biden described his plan largely accurately.

Disrespect or fair shot?

Nonetheless, many viewers said Castro went too far.

Gerson Borrero, a longtime New York City political commentator and columnist, said he was “disappointed” over the comments.

“In a cultural way, it shocked me,” Borrero said. “We respect our elders — there may be a point where we smile at their 'disparates' (gaffes), but at the same time we stay respectful.”

“He could have turned it around and asked Biden to clear things up and said, ‘I’m confused,'” said Borrero, who found it “troubling that Julián was disconnected to the audience reaction,” referring to the audible "ooooo" that reverberated through the room when Castro made the comment to Biden.

Throughout his campaign, Castro frequently talks about his grandmother, often reverentially, when he speaks about health care challenges and other issues; she helped raise him.

University of Maryland political scientist Stella Rouse said Castro "went somewhere where he didn't need to go."

"I think it will do more to turn people off — I don't think he did himself any favors and I don't think it will move the needle a lot," said Rouse, adding that many Latinos like Biden.

Others saw the exchange differently.

Rep. Ruben Gallego, D-Ariz., who is backing Kamala Harris, said after the debate that Castro decided to make sure he was relevant to the debate and "he found an opening and he took it."

Castro’s defenders also questioned whether the criticism he got was tinged with some racial bias.

Mayra Macias, executive director of Latino Victory Fund, which has endorsed Castro and works to get Latinos elected to public office, said Castro’s role in the primary campaign has been to push the conversations deeper and hold candidates accountable. Sen. Bernie Sanders of Vermont has done it many times and escaped attack, Macias said, as have other candidates.

“When a brown man is calling out a prominent white man, why is there this backlash that I don’t think would have happened if Senator Sanders was the one telling Vice President Biden if he forgot?” Macias said.

The backlash contrasts with the swing Castro took at Texas rival Beto O'Rourke when he chided him in the first debate for failing to do his homework on immigration. That clash was seen as Castro's breakout moment and contributions to his campaign spiked.

Throughout his campaign, Castro has contended with dismissals of him as too measured, lacking what it might take to stand up against the likes of President Donald Trump in a debate.

“What I can say is, I’m ready to dig when we go," Castro said after the debate, still wearing a big grin in the spin room and at ease despite the frenzy over his words. "When I go up against Donald Trump in October of 2020, you better believe I’m going to be ready for Trump and I’m going to beat him.”

Castro, who turns 45 on Monday and has a birthday bash planned in San Antonio, drew a generational distinction in his opening comments for the debate, depicting himself as a more visionary candidate.

“There will be life after Donald Trump. But the truth is that our problems didn’t start just with Donald Trump and we won’t solve them by embracing old ideas,” he said.

Castro’s twin brother, Rep. Joaquín Castro, D-Texas, who is chairman of Castro’s campaign, said his brother was doing what he did in the first debate: standing up for the issues he believes in.

In the debate, Castro also questioned Biden on the Obama administration's deportation policies after one of the debate's hosts, Univision anchor Jorge Ramos, asked the former vice president about the issue.

Bump or roadblock?

University of Texas political scientist Victoria DeFrancesco Soto said Castro knew coming into the debate "that he needed to stand out to the public."

"There’s the polling piece of making the next debates that I’m sure weighs heavily on his mind and he took a chance," DeFrancesco Soto said. "Question is, will he get a bump among some, like Kamala did immediately after the attack (referring to Harris's barbed comments about Trump) or will this hurt him in the immediate aftermath?"

Rouse said that going forward, Castro should “stick to the issues and the policy differences and leave the personal attacks alone.”

“Democrats would rather see the candidates not cannibalize each other,” Rouse said.

Tom Perez, Democratic National Committee chairman, said he was proud of the debate and called it “meaty," “substantive” and “spirited.”

That’s what debates are for, he said.

“Debates are not about raging agreement. We could have a 15-minute debate if that’s all they were about,” he said. “Whoever survives will by definition be battle tested.”

Follow NBC Latino on Facebook, Twitter and Instagram.