Messi, the best player of all time, took an early penalty wide to miss the chance to overtake Miroslav Klose as the leading World Cup goalscorer.
Messi later said he was “very angry” with himself after he came close to scoring twice, only to be denied twice by Austria captain David Alaba.
And then came the big moment, with Messi sweeping home on 38 minutes after being set up by Facundo Medina.
As Rangnick had warned, Messi moved into space and was all alone to score with his trademark swing of his left foot.
It was his 17th World Cup goal and his 18th when Messi struck again in the fifth minute of injury time.
This time the veteran scored as several defenders threw themselves completely onto the ball.
Messi, in his sixth World Cup, was also in a strong position in the 95th minute.
Ustad has five goals in this edition after scoring a hat-trick in the 3-0 win over Algeria.
This was Messi’s first treble in the World Cup.
