Gov. Chris Sununu signed a bipartisan bill into law Friday that aims to protect New Hampshire businesses from having to collect and remit sales taxes for other states.

Last year’s ruling in the South Dakota v. Wayfair case by the U.S. Supreme Court cleared the way for states to require businesses outside of their borders to collect and remit a sales tax on their behalf, even if they don’t have a “physical presence” in that state, such as a store or warehouse.

That reversed more than 50 years of precedent, and was seen as a blow to New Hampshire, one of just five states without a broad-based sales tax. Many local companies have little or no experience in collecting a sales tax, and often lack the accounting software necessary to process those transactions.

The new law, Senate Bill 242, requires foreign taxing jurisdictions to notify the N.H. Department of Justice at least 45 days before it attempts to collect any taxes from a New Hampshire company.

The Department will then review the legality of the tax, and the measure gives the Attorney General the ability to file suit if it believes the tax request is unconstitutional.

“So this bill is a major step forward to protect our New Hampshire businesses in the wake of that very harmful decision to our state,” said Sununu during a bill signing ceremony. “The legislation provides tools to allow New Hampshire to navigate that uncertain legal landscape in the coming years and provide those protections.”

Sununu was joined by Republican Sen. Jeb Bradley, and Rep. Susan Almy, a Democrat, as well as Attorney General Gordon MacDonald and John Formella, who serves as legal counsel for the governor and helped craft the bill.

Last summer, a similar measure cleared the Senate on a 24-0 vote during a special session called by Sununu, but was rejected in the House. This term, a slightly modified version of the measure sailed through Concord with little opposition.

Supporters of the law say the measure is likely to be challenged in court.