AUGUSTA, Maine (AP) — A judge has dismissed a lawsuit filed by Maine's Republican governor against the state's Democratic attorney general alleging that she was refusing to represent the administration in court cases for political reasons.

Gov. Paul LePage sued Attorney General Janet Mills in May after she declined to file amicus briefs on LePage's behalf supporting President Donald Trump's immigration orders. LePage said Mills' office should pay for his outside legal counsel when she refuses to represent him.

In an Oct. 16 order, a judge said the court cannot dictate how the attorney general spends her office's money.

Mills tells the Portland Press Herald she is pleased by the ruling. LePage didn't respond to a request for comment.

Mills is seeking her party's nomination for the 2018 governor's race. LePage is term-limited.