Now it gets dicey.
It seems that East started with five diamonds to the AKQ (or did West discard the Q?) and the
♥A. Does he have the
♠Q, or does his partner? Hard to say at first look (I'm disregarding the possible spoiler in your "they could have defeated the contract").

West has a singleton
♥, so East has the remaining 5. East also has a club - he followed to one round. So we know 11 of his 13 cards. He can't have more than 2 spades. This seems to be a restricted choice situation. But, not to be too hasty, I play on clubs, pitching hearts from hand until I need to ruff or overruff. What happens now? If East ruffs, it's easy. Overruff, play
♠A, finesse West for the
♠Q. If East discards but refuses to ruff, at least I now have a full count of his hand. If he has one spade, I play the spades the same way. If he has two, I'm on a restricted choice guess - and I'll guess to play it the same way. If East has the
♠Q, I'm down one.
I note that we can't put hypotheticals in the hand templates - they won't accept parentheses or question marks. Oh, well.