If you’re a Democrat, you have to dig pretty deep to find any silver linings in Election 2014, but results in several contested judicial races may provide at least a small amount of solace.

In North Carolina, where four of the seven supreme court seats were up this year, the GOP will maintain its edge (though the positions are officially nonpartisan). That said, two Democrats -- Robin Hudson and Sam Ervin IV -- were leading their races. A third Democrat, incumbent Justice Cheri Beasley, was deadlocked with challenger Michael Robinson.

Republican-aligned Chief Justice Mark Martin prevailed against a Republican-aligned challenger.

A Republican surge in North Carolina in 2010 and 2012 led to a staunchly conservative policy agenda and a resulting Democratic backlash; the pivotal role of the supreme court attracted wide attention and upwards of $5 million in campaign spending.

In an unusually high-spending race in Montana, Democratic-aligned Supreme Court Justice Mike Wheat easily held off a challenge from Republican-aligned former state Solicitor General Lawrence VanDyke. (Officially the seats are nonpartisan.)

In Missouri, Democratic Cole County Circuit Judge Pat Joyce survived a challenge backed by national Republicans. Because Joyce's court represents the state's seat of government, it has jurisdiction over key constitutional issues and ballot measures.

And in Michigan, incumbent Supreme Court justice Brian Zahra, a Republican, and Detroit-area attorney Richard Bernstein, a Democrat, were poised to claim the top two spots and earn seats on the court. In a separate race, appointed Republican incumbent David Viviano won a partial term.

Republicans scored clear victories in three other states.

In Ohio, appointed state supreme court incumbent Judith French -- backed by Republicans though officially occupying a nonpartisan seat -- prevailed against Cleveland Judge John O'Donnell, a Democrat.

In New Mexico, appointed Court of Appeals incumbent Republican J. Miles Hanisee narrowly defeated Democratic attorney Kerry Kiernan in a race that won plaudits for pitting two highly qualified candidates.

Finally, in Texas, the GOP continued its dominance of the supreme court and the court of appeals. Larry Meyers -- a court of criminal appeals judge elected as a Republican who later switched parties and decided to run for a Supreme Court seat this year -- lost his race. He will remain on the criminal court, since his seat was not up for renewal this year.

All told, TV ad spending in state Supreme Court elections by outside groups, political parties, and candidates reached $13.8 million since January, exceeding the $12.2 million spent in the 2010 midterm elections, according to an analysis by the Brennan Center for Justice and Justice at Stake of estimates provided by Kantar Media/CMAG.