The legislature’s decade-long failure to give the state’s 1,300 judges a raise violated the separation of powers doctrine by subordinating the judges to the “whims and caprices” of politicians who continually linked their pay to unrelated issues, a Manhattan-based appeals court ruled unanimously yesterday.

The Appellate Division, First Department, gave the Legislature 90 days to adjust judicial compensation to reflect an approximately 30 percent increase in the cost of living since 1998, when the last judicial raise was enacted.