Spain will play Germany or South Korea in the last eight.