Morocco defeated Saudi Arabia to reach the FIFA Arab Cup knockout stages while Oman downed Comoros but still suffered elimination.