PHOENIX (AP) — A 2016 Arizona law that expanded the ability of some groups to spend unlimited amounts of money on elections without disclosing their donors was challenged in court Wednesday by a group of Democratic lawmakers, a union and a voter advocacy group.

The lawsuit filed in Maricopa County Superior Court seeks to overturn parts of the law allowing corporations and some non-profit groups to avoid disclosure. It also seeks to overturn the removal of the Citizens Clean Elections Commission from enforcement authority over some outside campaign spending, and to invalidate another part that allows political parties to pay for lavish fundraisers for candidates.

The lawsuit says they violate the state Constitution because they illegally change the 1998 Clean Elections Act, which created a public campaign financing system, rules for disclosing spending even if candidates don't participate and enforcement by the commission.

The provisions were part of a massive rewrite of campaign finance laws pushed by Secretary of State Michele Reagan last year. Reagan spokesman Matt Roberts says they're reviewing the lawsuit, but will continue enforcing the challenged provisions until a court orders otherwise.

Joel Edman, executive director of the voting rights group Arizona Advocacy Network, said the Legislature overstepped its bounds by cutting the commission out of the process of regulating so-called "dark money" groups that can pour millions into campaigns. He said the commission plays a key role in ensuring voters know who is spending money backing candidates and other issues and enforcing those rules.

"We've seen repeated attempts to undermine the commission's authority and ability to enforce those rules, and protect the purpose of the act, which is to give voters confidence in how the electoral process is working," Edman said.

Republicans pushed the law through the House and Senate in 2016 over the loud objection of minority Democrats. Republican House Speaker J.D. Mesnard defended the law Wednesday, saying the bill made transparency greater in many ways.

"We didn't change anything with regards to the Clean Elections Commission, we couldn't have because that would have required a three-quarters vote," Mesnard said. "There may be some disagreement as to who has jurisdiction, who has to report."

Attorney Jim Barton, who filed the suit on behalf of Edman's group, 25 Democratic lawmakers and the bricklayers union, disputed that. He said the law changes the commission's enforcement authority by only giving it to the secretary of state in some cases and by changing the definitions of contribution and expenditure to remove enforcement authority from the commission in other cases.

The union is suing because some non-profit groups are exempt under the new law from filing, but it is not because it filed under a different part of federal tax law affecting non-profits. But according to Barton, the biggest problem is the removal of the commission from oversight of some political spending.

"The Clean Elections Commission has taken its role as an enforcer of election and campaign finance law very seriously and I think it's a problem for our state if we lose that," Barton said. "And some of these provisions we're challenging just may allow a lot of spending on elections to go without telling Arizona voters who's funding that spending, and I think it's a problem."