In the chaotic days of late March, as it became clear that New York was facing a catastrophic outbreak of the coronavirus, aides to Gov. Andrew M. Cuomo quietly inserted a provision on Page 347 of New York’s final, voluminous budget bill.

Many lawmakers were unaware of the language when they approved the budget a few days later. But it provided unusual legal protections for an influential industry that has been devastated by the crisis: nursing home operators.

The measure, lobbied for by industry representatives, shielded nursing homes from many lawsuits over their failure to protect residents from death or sickness caused by the coronavirus.

Now, weeks later, more than 5,300 residents of nursing homes in New York are believed to have died from the outbreak, and their relatives are finding that because of the provision, they may not be able to pursue legal action against the homes’ operators over allegations of neglect.