Concord — Two New Hampshire state workers have filed a class-action lawsuit in federal court against the union representing state employees, seeking reimbursement of obligatory union fees.

Patrick Doughty and Randy Severance, who are not union members, sued the State Employees’ Association of New Hampshire, SEIU Local 1984, on Monday. They asked a judge to order union officials to refund fees taken from their wages and other New Hampshire public employees.

They point to a U.S. Supreme Court ruling last June that said government workers can’t be forced to contribute to labor unions that represent them in collective bargaining. Unions had argued that so-called fair share fees pay for collective bargaining and other work the union does on behalf of all employees, not just its members.

In July, an Oregon state employee and a labor union reached a settlement over a lawsuit seeking reimbursement of union fees, resulting in the first refund. The National Right to Work Legal Defense Foundation assisted with the lawsuit and others, including the one in New Hampshire.

New Hampshire in 2017 rejected right-to-work legislation, which would have prohibited unions from charging fees to nonmembers for the costs of representation.