Justice William Rehnquist wrote for the majority.