Editor's note: This story has been updated to reflect additional comments from U.S. Rep. Beto O'Rourke's campaign and U.S. Sen. Ted Cruz's response to them.

A new attack ad from U.S. Sen. Ted Cruz's Senate campaign knocks U.S. Rep. Beto O'Rourke, D-El Paso, for voting against tax relief for Hurricane Harvey victims last year. While the vote did happen, the bill was part of broader negotiations that O'Rourke said at the time prompted his vote against it.

Here's a deeper look at the bill at the center of Cruz's attack and O'Rourke's defense of his "no" vote.

Cruz's attack

The 30-second spot called "Completely Ridiculous" is currently only available online. It opens with rescue footage and shots of Cruz meeting with storm victims, while highlighting Cruz's support in the U.S. Senate for disaster relief funding and emergency tax relief for Harvey victims.

The ad then hits O'Rourke for voting against the tax relief measure.

"Congressman Beto O’Rourke? So irresponsible that he even voted against Hurricane Harvey tax relief," the narrator says.

O'Rourke's defense

Almost immediately after casting his vote against that bill last year, O'Rourke began defending his decision. The bill, which was later signed into law, allowed Harvey victims to receive tax deductions on personal losses from the storm and reduced penalties for withdrawing funds from retirement accounts to cover storm-related costs. But it was a sprawling piece of legislation that also included a reauthorization of the Federal Aviation Administration and other small health care programs.

In a post on Medium at the time, O'Rourke said he couldn't support the bill because it didn't include funding reauthorization for the Children's Health Insurance Program (CHIP) and Community Health Centers (CHC), which were both set to expire within days of the vote.

"Without returning this legislation for further improvement, I am not confident Congress would have reauthorized these programs," he wrote.

Speaking to reporters Tuesday after an event in Austin, O'Rourke noted that he had "voted for more than $90 billion in aid for Hurricane Harvey victims" while in Congress. But the bill Cruz is highlighting in his latest ad was not a good deal for those victims, O'Rourke said.

"As you know, that tax break was a fraction of what was afforded to those who were recovering from Superstorm Sandy in the Northeast," O'Rourke said. "That tax break was included in FAA reauthorization that failed to reauthorize the Children's Health Insurance Program upon which hundreds of thousands of Texas children and families depend. And so we were there for those hit by Harvey, but we were also there for those kids who need to make sure they can receive that medication, see a therapist, get to a doctor – because it'll literally make a life-or-death difference for them."

Though O'Rourke claims Sandy victims received bigger tax breaks than those proposed for Harvey victims in this bill, Sandy victims did not get any such federal tax breaks, according to Politifact Texas and NBC News.

Cruz highlighted and mocked O'Rourke's claim regarding Sandy victims Wednesday evening. On Thursday, O'Rourke's campaign acknowledged he had misspoken in referencing Superstorm Sandy – both in his blog post at the time of the vote and this week speaking to reporters. A spokesman for the El Paso Democrat said O'Rourke meant to say that the tax breaks offered to Harvey victims were less generous than those offered to victims of Hurricanes Katrina, Rita and Wilma.

More context

The relief package at issue came to the House floor just two months after Republican efforts to repeal Obamacare failed. At the time, federal health care programs were again in the spotlight as the end of the government's fiscal year loomed and key health programs were up against a deadline to be reauthorized. Senate Republicans were also making a last-ditch effort to repeal Obamacare while Democrats in the House and Senate were pushing for the renewal of CHIP and CHC funding, all just days before the end of the fiscal year.

"The recent debate on health care in our country has only reinforced the need for quality, affordable care," O'Rourke wrote at the time. "That simply will not be possible without these two programs that so many children and families in El Paso rely on."

After an initial House vote on the bill failed, it passed on a second try on a 264-155 vote. All Texas Republicans and most Texas Democrats voted in favor of the measure. Four Texas Democrats voted against it, including O'Rourke. U.S. Reps. Sam Johnson, R-Richardson, and Eddie Bernice Johnson, D-Dallas, didn't vote.

Patrick Svitek contributed to this report.