Lionel Messi was the hero again as Argentina wrapped up their Copa America preparations with a 5-1 rout of minnows Nicaragua.

Messi scored two goals in two minutes to lead Argentina past Nicaragua on Friday before Lionel Scaloni's men fly out to Brazil for the Copa America.

Having ended his international absence in March's shock loss to Venezuela, Messi opened the scoring with a stunning solo effort in the 37th minute.

After dancing his way past three defenders for the opener, Messi rebounded a Sergio Aguero shot just seconds later to take his international tally to 67 goals.

Lautaro Martinez came off the bench and scored a second-half brace against the Central American visitors, while Roberto Pereyra added a fifth late on before Nicaragua's Juan Barrera converted a 91st-minute penalty to put a blemish on Argentina's performance.

Argentina dominated from the outset, though Nicaragua proved dogged opposition in San Juan, where Messi was in the thick of the action.

Aguero – earning his 90th cap – almost slid in to break the deadlock before Messi wasted a golden chance in the 12th minute after receiving a lofted ball from Giovani Lo Celso, only to fail to make proper contact from close range.

Matias Suarez then struck the post approaching the half-hour mark, though the home side eventually got their goal thanks to Messi's brilliance.

Messi weaved and shimmied three defenders before firing low past Nicaragua goalkeeper Justo Lorente into the net.

Nicaragua were barely able to recover as Messi converted a rebound after Lorente could only parry Aguero's shot in the Barcelona superstar's path.

That proved to be Messi and Aguero's final contributions – the pair making way for Paulo Dybala and Martinez.

And Inter's Martinez sealed the victory by curling a shot into the bottom corner of the net with 27 minutes remaining, before firing home a fourth from close range 10 minutes later.

Fellow substitute Pereyra then drifted in at the back post and tapped in for the simplest of goals during the final nine minutes, however, Nicaragua spoiled Argentina's clean sheet via a stoppage-time penalty after a Nicolas Otamendi handball.

 

What does it mean? Argentina ready for Copa America

Or as ready as they can be. Scaloni has tried to expose as much international football to his players as possible. Runners-up in 2015 and 2016, Argentina head into the major South American tournament with back-to-back wins and four in five.

Messi magic masterminds another win

A 45-minute appearance was enough for Messi to inspire Argentina at Estadio San Juan del Bicentenario. Fresh off winning a sixth European Golden Shoe following 36 LaLiga goals, Messi's quick-fire brace set the tone for Argentina. The 31-year-old was lively throughout, trying to create in the opening half.

Argentina hardly tested

With James Rodriguez and Colombia waiting next, Scaloni perhaps may have wanted a greater test, especially for his defenders. Franco Armani had little to do between the sticks, except for picking the ball out of the back of the net after Otamendi was penalised for handball at the death.

What's next?

Argentina will open their Copa America campaign against Colombia in Salvador on June 15, while Nicaragua face co-hosts Costa Rica in their CONCACAF Gold Cup opener a day later.