Kirill KUDRYAVTSEV / AFP
DOHA - Messi gave the Copa America holders an early lead from the penalty spot but Saleh Al-Shehri equalised early in the second half and Salem Al-Dawsari struck a sensational winner.
Argentina, who were one of the favourites to win the World Cup, would have equalled Italy's record of 37 matches unbeaten had they avoided defeat in the Lusail Stadium.
Saudi Arabia is ranked 51st in the FIFA world rankings.