BOSTON - U.S. Sens. Elizabeth Warren and Ed Markey, D-Massachusetts, joined union leaders and workers at a rally in Boston on Monday to support unions as the U.S. Supreme Court heard a case that could significantly diminish union power.

"For years, big corporations and billionaire donors and their Republican allies have launched one assault after another against unions and against working people," Warren said. "Corporations and anti-union forces are doing everything they can to tilt the scales in their favor....We're here today because we have not given up. We're ready to fight back."

The U.S. Supreme Court on Monday heard arguments in Janus vs. American Federation of State, County and Municipal Employees, Council 31. The case could decide the legality of "fair share" or "agency" fees, which are fees that workers whose workplaces are unionized must pay even if the workers choose not to join the union. The ruling could have a major financial impact on unions around the country.

Lee Saunders, president of AFSCME International, came from Washington, D.C. to speak at the Boston rally. "This case isn't about free speech," Saunders said. "This case is about political power. This case is about those who have wealth and power in this country, they want more wealth and power at the expense of all of you. They can go straight to hell, because we're fighting back."

In 1977, in the landmark case Abood v. Detroit Board of Education, the Supreme Court ruled that government employees can be forced to pay a fee to a union to cover the cost of negotiating a contract. The logic was that since the union contract covers all workers, everyone should have to pay for the cost of negotiations, even if an employee chooses not to join the union.

Slightly less than half the states allow unions to collect fair share fees, while slightly more than half of states prohibit the practice.

In this case, Mark Janus, a public employee in Illinois, has asked the Supreme Court to overturn Abood and prohibit unions from collecting fees from non-members.

Janus argues in a court brief that agency fees violate employees' First Amendment rights to free speech. He says imposing the fees requires employees to fund political speech, since unions are trying to influence government's personnel policies.

"It permits the government to compel employees to subsidize an advocacy group's political activity: namely, speaking to the government to influence governmental policies," Janus's attorneys wrote in a court brief.

AFSCME argues that Abood was correctly decided, and fair share fees are important for labor relations and fairness. The union cites previous decisions to argue in a brief that "collection of the fees is justified by States' strong interest in promoting labor peace through collective bargaining and in avoiding the 'free rider' incentive that would arise if non-member employees could avoid paying any dues while nevertheless retaining the benefits of representation by an informed and expert negotiator."

The sides also dispute whether unions can appropriately distinguish which expenses should be considered when calculating non-member payments.

The Trump administration filed a brief supporting Janus. Lawyers for the United States argue that issues like merit pay, state employee tenure and the size of the workforce relate to 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," attorneys for the United States wrote in a court brief.

The New York Times reported that conservative donors have been bankrolling an effort, which led to this court case, to limit unions' power, since unions tend to back Democrats.

"This case is an attack on working people brought by billionaires," Markey said at the Boston rally. "Donald Trump and his Republican Party want to break every single union that exists today and make sure that no one can organize tomorrow."

More than a dozen union leaders addressed a crowd of union workers in front of a Boston firehouse. The noon rally was part of a day of action organized by unions, which includes a 5 p.m. rally in Springfield and other events throughout the state.

"This is an attack on working people," said Steven Tolman, president of the Massachusetts AFL-CIO. "They're trying to divide us. We're going to work hard to make sure that's not the case."

"This is a case that is about freedom to unite for better jobs, for a better country, for a better life," Tolman said.

Johnny McInnis, political director for Boston Teachers Union and a Boston music teacher, said he used to teach in North Carolina, a state that does not require non-union members to pay a fee. There, he said, there was no union, pay was low, and it was hard to push for better working conditions. He said he worked as a part-time UPS driver while teaching, because that job was unionized so the benefits were better.

When McInnis came to Boston, he said he learned the benefits of a union in pushing for better working conditions and better conditions for students.

Boston Mayor Marty Walsh said his father was a union member, and so was he, and that allowed him to access critical health care benefits. "I have a union book in my pocket, I'm proud of that book," Walsh said.

"This court case is all about dividing workers," Walsh said. "It's about driving down wages, it's about eliminating benefits, it's about eliminating work rules."

Mingling with the rally crowd were Democratic gubernatorial candidates Setti Warren and Jay Gonzalez.

Massachusetts Attorney General Maura Healey, a Democrat who filed an amicus brief in the case supporting the union, is in Washington, D.C. for the National Association of Attorneys General's winter meeting.