FILE- In this undated file photo provided by the Arkansas Secretary of State’s office, Arkansas Supreme Court justice Courtney Goodson poses for a photo. Circuit Judge Dan Kemp won the race against Goodson to lead the Arkansas Supreme Court Tuesday, ... more >

LITTLE ROCK, Ark. (AP) - With a vow to represent “conservative values” and the backing of the National Rifle Association, Courtney Goodson seemed poised to take advantage of the trend to the political right in Arkansas and become the first woman elected to lead the state Supreme Court.

Instead, the sitting justice became a prime target for conservative groups that shattered Arkansas spending records to defeat her as part of a bid to reshape the nation’s state courts. The effort paid off, with two circuit judges reaping the rewards in a pair of high court races that were overshadowed by a barrage of attack ads and campaign mailers that rivaled the vitriol of the presidential race.

Circuit Judge Dan Kemp defeated Goodson in the race to lead the seven-member court, succeeding interim Chief Justice Howard Brill. A circuit judge and former lawmaker who had once advocated banning gays and lesbians from fostering children won the race for another open seat on the court.

Goodson, who has two years left on her term on the court, said she planned to focus on trying to eliminate the outside spending that ultimately doomed her bid.

“I plan to continue serving (voters) by upholding our state constitution and finally ridding Arkansas of anonymous dark money judicial campaigns,” Goodson said in a statement.

Nearly $1.3 million was spent on television ads in both races by the candidates and groups, more than double the previous record in Arkansas for a judicial election. Goodson herself had loaned her campaign nearly half a million dollars in her bid for the seat.

The bulk of the TV spending came from outside groups, with the Judicial Crisis Network spending more than $600,000 on television ads portraying Goodson as an insider for accepting gifts and contributions from trial attorneys. A mailer called the justice President Barack Obama’s “rubber stamp” for the court’s 2014 ruling striking down Arkansas’ voter ID law.

In the final days of the campaign, Goodson had pushed back against the ads and accused Kemp of coordinating with the group. Kemp said he had no prior knowledge of the ads, and said Tuesday night he didn’t need the outside help.

“I’m confident we would have won even without these outside groups pumping this much money and these ads into the state,” Kemp said.

Watchdog groups have said the Arkansas campaign may signal that outside spending will be a growing influence on judicial races nationwide this year, a trend strengthened since the 2010 Supreme Court’s Citizens United ruling opened the door for unlimited political spending by corporations, unions and other interest groups.

The Republican State Leadership Committee, which had also sent out mailers targeting Goodson, bought $250,000 in television airtime to run ads criticizing Mason. The 30-second spots accused Mason of charging high fees to his clients, dubbing him “Clark ‘Ka-Ching’ Mason.”

The spots were a turnoff to Larry Wheeler, who cast his vote for Goodson at Bauxite City Hall, about 25 miles southwest of Little Rock.

“The bad money is with the other one, that’s why I voted for Goodson,” Wheeler, 67, said. “It was the person that won my vote. It wasn’t the money.”