A right to repair bill that would have forced manufacturers selling electronic devices and other consumer products in Ontario to provide consumers and small businesses with the tools and knowledge to repair brand-name gadgets is officially dead. The failed vote follows lobbying against the legislation from major tech companies including Apple, according to the bill’s sponsor.

The bill, which was put forward by Liberal MPP Michael Coteau in February, aimed to force companies like Apple to provide small businesses and average consumers with official parts, diagnostic tools, and repair manuals upon request, and at a fair price. It would have been the first such law in North America—though 20 US states are considering similar legislation—and threatened to send consumer-friendly ripple effects throughout major electronic manufacturers’ global operations.

Home and affordable third-party repair of brand-name devices is often extremely difficult or even outright illegal thanks to company lobbying, tightly controlled access to repair tools and parts, and government intervention.

On Thursday, the bill had its second reading in Ontario parliament; essentially, a debate on whether the bill, in principle, is worthy of further debate, research, and discussion until it can be decided upon in its final form. While some MPPs urged their colleagues to vote yes on the bill simply to allow for further exploration of the issue, it faced staunch resistance from members of the ruling Progressive Conservative Party of Ontario.

Some PC members argued that the bill cut against the Ontario government’s new “open for business” slogan by compromising US companies’ intellectual property rights to the point that they would not sell their products in Ontario, a province that contains nearly half of Canada’s total population. MPP Kaleed Rasheed claimed that the bill would force companies to hand their “codes” and “security stuff” to average consumers, though it only called for repair manuals, diagnostic tools, and parts. When it came to a vote, the bill was killed on the floor.

In a phone call, Coteau told me he expected resistance. After proposing the bill, he was approached by Electronics Product Stewardship Canada (EPSC)—an industry group that represents Apple, Panasonic, and other major tech companies—as well as representatives from from Apple and Panasonic, he told me. “I had an Apple senior counsel fly in...to come and see me,” Coteau said.

The group’s collective position, Coteau said, was that the bill would compromise companies’ intellectual property rights and that home repair was a public safety issue, meaning “that it’s dangerous for people to open up electronic devices and fix it themselves, that it could harm them,” Coteau said. Samsung also got in touch, he told me.

Motherboard learned this week that a right to repair bill in California was pulled by its sponsor after an industry association representing Apple and other tech companies lobbied against the bill by arguing, among other things, that people trying to repair their phones could hurt themselves by puncturing the lithium-ion battery. Apple executive Lisa Jackson made a similar argument in 2017, saying at TechCrunch Disrupt that the company’s phones are too “complex” for non-authorized repair.

A May 1 letter from the Ontario Chamber of Commerce to Bill Walker, Ontario’s Minister of Government and Consumer Services, obtained by Motherboard reiterates this point almost exactly.

“Another concern is safety,” the letter stated. “Consumers need to be assured that their medical devices, appliances, laptops, and other electronic devices are being repaired correctly in order to minimize risks to their safety. Manufacturers are best suited to provide this assurance. For example, at present, products containing high-energy lithium ion batteries are only repaired by trained professionals who understand the hazards associated with breakage of these batteries.”

Read More: Apple Is Telling Lawmakers People Will Hurt Themselves if They Try to Fix iPhones

Apple did not respond to Motherboard’s request for comment on whether the company met with other legislators or groups ahead of the vote, or what the purpose and content of those conversations were. Spokespeople for EPSC were also not available for comment.

Right to repair advocates in the United States, meanwhile, point out that many people and small businesses regularly repair iPhones and other electronics without incident.

During the debate in provincial parliament, New Democratic Party MPP Tom Rakocevic wondered aloud where the opposition to the bill stemmed from. “Maybe Apple called and they bit the apple,” he said on the floor.

Minister Walker pointed to the supposed danger of home repair during question period on Tuesday when asked about the right to repair bill by MPP Coteau. “You repair your toaster, and at the end of the day, your house burns down—who’s protecting that?” the Minister said.

When reached for comment on whether the Minister or his office was contacted by Apple representatives, press secretary David Wooley said in an emailed statement that “We heard from industry stakeholders about their concerns with the bill,” but noted that the Minister had his own problems with it when it was first introduced.

“The proposed legislation sounds good in theory but is completely unenforceable in practice and threatens consumer choice,” the statement from the Minister read.

Though the right to repair bill is dead in Ontario, Coteau believes that it’s only a matter of time before politicians and the public realize these consumer protections are much-needed.

“There will be a politician somewhere in this country that will present something, and eventually it will stick, and we’ll be able to move forward based on that,” Coteau said.