President Donald Trump’s administration has endorsed Gov. Bruce Rauner’s side of a legal case challenging fees public employee unions collect from nonmembers, saying in a brief filed with the U.S. Supreme Court that the system is unconstitutional.

Rauner brought the case shortly after he was sworn into office in 2015, saying he wanted to see the issue all the way to the Supreme Court. He was later removed from the case but has continued to tout it.

Illinois is one of about two dozen states that require many workers to pay what’s known as “fair share” fees to public employee unions even if they are not union members. The thinking is that workers who are not part of a union still benefit from its services, even if they don't support its political agenda.

Unions negotiate new contracts and handle grievances on behalf of all workers within a bargaining unit, not just those who are members. The fair share fees help pay for those efforts.

Rauner contends that the fee arrangement violates free speech and that workers should not have to support unions they don’t want to belong to. Unions are not allowed to spend fair share fees on political activities such as campaign contributions, but the governor says it's impossible to separate political activities because public-sector unions negotiate directly with the government.

“In the public sector, speech in collective bargaining is necessarily speech about public issues,” the administration’s brief said. “Virtually every matter at stake in a public-sector labor agreement affects the public fisc, and therefore is a matter of public policy concerning all citizens. Moreover, issues like tenure for state employees, merit pay, and the size of the state workforce are about more than money: they concern no less than the proper structure and operation of government. To compel a public employee to subsidize his union’s bargaining position on these questions is to force him to support private political and ideological viewpoints with which he may strongly disagree.”

The Trump administration’s position in the case is a reversal of the federal government’s original stance on the issue. Under the Obama administration, government lawyers had argued in support of the unions.

The Rauner administration did not respond to a request for comment. But one of Rauner’s Democratic rivals was quick to pounce on it as evidence that the governor is aligned with Trump.

Democratic candidate for governor J.B. Pritzker said in a statement that “after failed attempts to force his special interest agenda on Illinois, Rauner is partnering with Trump to roll back worker’s rights on a national scale.”

Rauner, who is seeking re-election, has tried to keep a distance from Trump to avoid alienating the moderate voters he’ll need in order to win a second term.