Special interest groups gave millions of dollars to judicial candidates in the month before last week’s elections, but failed to defeat their opponents in some of the tightest races in the country.

In the most expensive race, various business groups were unable to win the retention of the incumbent chief justice of the Alabama Supreme Court. A former appellate judge defeated the Republican candidate to become the sole Democrat on the state high court.