TOPEKA, Kan. (AP) — Three federal judges on Tuesday ordered Kansas to cover $389,000 worth of attorneys’ fees and expenses for individuals involved in a lawsuit last year that stemmed from the Legislature’s inability to redraw political boundaries to ensure equal representation.

The three-judge panel ruled that 15 legislators, business leaders and voters achieved enough of their goals in the redistricting lawsuit to warrant having at least part of their attorneys’ fees and expenses covered. The court said those individuals had wanted the state to cover about $671,000 in bills, while the state had sought to have them bear almost all the expense themselves.

A bitter stalemate between moderate Republicans and GOP conservatives prevented the Legislature from passing any measures last year to redraw congressional, legislative and State Board of Education districts, despite a once-a-decade requirement imposed by the state and federal constitutions. Robyn Renee Essex, a Republican precinct committee member from Olathe, filed the federal lawsuit even before legislators adjourned, and the presiding three-judge panel imposed its own lines.

The three judges allowed 26 individuals — some key figures in the Legislature’s impasse — to join Essex as plaintiffs. Essex originally named Secretary of State Kris Kobach as the defendant because he is the state’s chief elections officer. Attorney General Derek Schmidt later joined the case in hopes of limiting the attorneys’ fees borne by taxpayers.

Not all of the people involved in the case with Essex sought to have attorneys’ fees or expenses covered. But Presiding Judge Kathryn Vratil, the chief judge for the U.S. District Court in Kansas, said the parties requesting fees had asked the three-judge panel to prevent Kobach from supervising elections under the previous political boundaries and to impose new lines ensuring equal representation.

Vratil wrote in the court’s 23-page opinion Tuesday that the intervening parties “received exactly the relief which they requested.” She wrote that the panel — which included Senior U.S. District Judge John Lungstrum and Chief Judge Mary Beck Briscoe of the 10th U.S. Circuit Court of Appeals in Denver — reviewed 25 redistricting plans from lawmakers.

“Much hard work followed, and counsel for all parties contributed to the effort,” Vratil wrote. “No neat partisan plans came from the legislature, and the political parties did not generate acceptable plans. The legislative session did not end in a stalemate over two competing plans, leaving the Court a clear choice between one or the other.”

Kobach and Schmidt had argued that only Essex could be considered the prevailing party in the case and even then, the state questioned the attorneys’ fees she sought to have covered. Kobach didn’t immediately return a telephone message seeking comment on Tuesday’s ruling.

Schmidt spokesman Don Brown said in an email statement that his office is reviewing the ruling but is “encouraged the court reduced the fees to be paid by taxpayers.”

The three-judge panel limited the amount of attorneys’ fees to be covered by assessing how successful each individual or group was in achieving its goals. It also capped the hourly rates to be covered at $300 for law firm partners, $200 for associates, $100 for paralegals and $75 for law students.

The court declared Essex “50 percent” successful and ordered the state to cover $21,586 in attorneys’ fees and expenses for her, rather than the $45,156 request submitted on her behalf. Brent Haden, a Columbia, Mo., attorney representing her, declined to comment.

The biggest award, covering $134,215 in attorneys’ fees and expenses, went to a four-person group led by former state Senate Reapportionment Committee Chairman Tim Owens, a moderate Overland Park Republican who lost his seat in the 2012 GOP primary. The federal judges said Owens’ group advocated specific congressional, legislative and Board of Education plans and deemed the group 75 percent successful in achieving its goals.

The judges concluded that House Minority Leader Paul Davis, a Lawrence Democrat, and former Bill Roy Jr., a Lenexa Democrat, were 50 percent successful and awarded them $46,063 for attorneys’ fees and expenses.

“We had to get involved in this lawsuit, certainly, to protect our own interests,” Davis said.

Senate Minority Leader Anthony Hensley, a Topeka Democrat who was a witness in the lawsuit, said the state shouldn’t appeal Tuesday’s decision, calling it fair.

“This is a chapter in Kansas politics, I think, that we need to put behind us,” Hensley said.