A divided U.S. Supreme Court on Thursday ruled against a foundation for Andy Warhol in a copyright infringement case over the late artist’s silkscreen portrait of the singer Prince, which was adapted from a photograph.

The high court’s 7-2 decision in favor of photographer Lynn Goldsmith spurred sharp words between two usual allies on the bench: Justices Sonia Sotomayor and Elena Kagan.