Medical device maker Medtronic moved its legal headquarters to Ireland last year in a controversial $50 billion deal that forced about 20 percent of the people who owned its stock to shell out thousands of dollars each to cover capital gains taxes.

Now some shareholders want the company to cover those costs. First they will have to convince the Minnesota Supreme Court to agree with them that state law does not — or should not — prevent them from being able to bring their lawsuit at all. If they win at the high court, the plaintiffs would still have to prevail in a future trial or get a settlement to see any money.

In oral arguments Wednesday morning at the Supreme Court, the attorney representing Medtronic said the two-year-old class-action lawsuit should never have gotten to the state’s highest court. That is because long-standing Minnesota business law gives boards of directors legal protections so they can run a company without being second-guessed by litigious shareholders.

“The question before you this morning is whether you will abandon the rule of law that has been effectively applied for decades, and embrace a rule of law ... that is inconsistent with your most recent statements of public policy,” said Medtronic’s attorney, Eric Magnuson, who was chief justice from 2008 to 2010.

The aggrieved shareholders, however, argue that long-standing rule of law doesn’t address unique situations that can arise during corporate inversions like Medtronic’s.

An inversion happens when a U.S.-based company relocates its headquarters to a lower-tax jurisdiction through a corporate acquisition. In January 2015, Medtronic acquired health care supplier Covidien for $49.9 billion in cash and stock in a deal that put the combined company in Covidien’s old headquarters building in Dublin, Ireland. CEO Omar Ishrak continues to run the company from offices in Minnesota.

Medtronic’s board members knew the inversion would impose taxes on the minority of shareholders whose stock was not protected in a tax-deferred account like an IRA. The board members also knew Medtronic’s management strongly favored of the deal — so much so that the company agreed to cover $69 million in special excise taxes on company officers imposed by Congress to discourage inversions.

That left the board members with a conflict of interest. Minnesota law requires them to consider not only the interests of the corporation, which would benefit from lower taxes, but also the plaintiffs who would have to pay taxes to keep shares they already own.

“Can a Minnesota corporation ... enter into a transaction to save income taxes that otherwise it would have to pay, and in the process of doing so, shift that tax burden to a small minority?” asked Vernon Vander Weide, the Minneapolis attorney representing activist shareholder Kenneth Steiner. (The case is styled as a class-action, but class-action status has not been granted.)

The initial trial judge tossed out the lawsuit in 2014. But last February, a three-member panel of the state Court of Appeals reinstated the case, saying the trial court erred on the procedural question of whether the plaintiffs had grounds to file their case.

The outcome may turn on the arcane legal question of whether all of Medtronic’s shareholders were affected in the same manner by the capital gains taxes, or if the impact was felt only by the subset who actually paid the taxes.

If all shareholders were affected equally, that would be evidence that the lawsuit is “derivative” of an injury that was actually suffered by Medtronic as a whole. Minnesota law bars plaintiffs from bringing derivative lawsuits unless the facts are first presented to the company board for an investigation, which was not done in the Steiner case.

But if Medtronic’s action hurt only a subset of shareholders — say, the roughly 20 percent of Medtronic shareholders who paid the tax — that would be evidence that the injury to those shareholders was “direct.” Shareholders can bring lawsuits for direct injuries without going through the company first.

That left Magnuson on Wednesday to argue shareholders who paid no taxes were affected in the same manner as families who did pay the taxes.

“Every shareholder of old Medtronic was affected in the same way ... They all suffered a taxable event. Now how much that cost a particular shareholder may vary. ... But it isn’t the calculation of damages that you look at. It’s the nature of the impact on the shareholders,” Magnuson said.

“That argument seems to have an air of unreality about it,” Associate Justice David Lillehaug noted, “because there certainly will be shareholders who will not end up paying a capital-gains tax, through a nonprofit, or they’ve got their shares in an IRA or something like that.”

Steiner’s lawsuit also alleges that Medtronic shareholders were injured after the company’s board decided to structure the deal so that shareholders in “old Medtronic” would comprise only 70 percent of the new Medtronic. IRS rules say the company could have been taxed as a U.S. entity if the percentage was 80 percent, but lowering it to 70 percent diluted the value of the old shares, Vander Weide said in court Wednesday.

It’s not clear when the court will issue a ruling, but Minnesota’s business community has been watching the case closely.

The state Chamber of Commerce filed a friend-of-the-court brief in June urging the Supreme Court justices to overturn the appeals court decision that revived the case earlier this year.

“The Court of Appeals decision, which adopts a new standard for determining whether a shareholder claim is direct or derivative, will result in more shareholder claims being characterized as direct claims,” the chamber’s lawyers wrote. “As a result, Minnesota businesses will be exposed to increased litigation expense and liability risks.”