HELENA, Mont. — A former Montana legislator has agreed to pay $19,599 to the state to settle allegations that he took illegal corporate contributions from a dark-money organization not required to disclose its donors or spending.

The agreement between former Rep. Dan Kennedy, R-Billings, and Commissioner of Political Practices Jonathan Motl is the sixth of nine cases against Republican candidates accused of taking illegal contributions during the 2010 primary elections that have been resolved by settlement or in court.

The amount Kennedy agreed to pay is the same amount a jury earlier this year found that Rep. Art Wittich took in in-kind contributions from the corporate groups affiliated with the anti-union National Right to Work Committee. Wittich’s case was the first of the nine to go to trial.

Kennedy represented a Billings district in the Montana House from 2011 to 2013. His 2010 primary opponent, Debra Bonogosfky, filed a complaint with Motl’s office alleging that Kennedy broke campaign finance laws.

Motl concluded that Kennedy was among 14 Republican candidates who received a package of services from organizations affiliated with the National Right to Work Committee. The package included campaign advice, thousands of voter mailings, website design, voter data and other services.

Motl filed civil lawsuits against the nine candidates he knew about before the time limit to prosecute the 2010 cases ran out.

As part of the settlement, Kennedy acknowledged that he received the services but said he did not know at the time they came from paid staff of the National Right to Work Committee. He wrote in a sworn statement that he received the services from corporations run by Christian LeFer, who ran an organization called Western Tradition Partnership.

“While I can see my mistake best by hindsight I also accept my responsibility for not determining the nature of these groups before accepting the paid services they were offering me,” Kennedy wrote in the statement.

National Right to Work Committee officials and LeFer have declined to return calls for comment on the allegations by Motl. A separate lawsuit against the group and its affiliates is pending.