A unanimous U.S. Supreme Court on Wednesday ruled that prosecutors may use evidence from a court-ordered mental evaluation against a capital defendant to rebut the defendant’s own psychiatric testimony.

Justice Sonia Sotomayor, writing for the court in Kansas v. Cheever, reaffirmed Buchanan v. Kentucky, a 1987 ruling that allowed prosecutors to use that evidence for the limited purpose of rebutting a “mental-status” defense.