BUENOS AIRES, Argentina -- Gerardo Martino has been hired as coach of Argentina, less than three months after leaving Spanish club Barcelona.

The Argentine Football Association said the 51-year-old Martino will replace Alejandro Sabella, who stepped down after Argentina's loss to Germany in last month's World Cup final.

Martino will be officially introduced on Thursday.

It will be Martino's second coaching role with a national team, having been in charge of Paraguay from 2006-11.

Martino was hired until the end of qualifying for the 2018 World Cup, but the contract will be automatically extended if the team makes it to the tournament in Russia.

Martino left Barcelona in May with one year left on his contract after the club failed to win a major trophy for the first time in six years.

Known for offensive squads, Martino had been favoured for the job by soccer association president Julio Grondona, who passed away on July 30.

One of the reasons Martino was seen as a good fit for the role is because he has good relations with Lionel Messi and midfielder Javier Mascherano, the Barcelona players who are the leaders of the Argentine national team.

His first official task will be to pick the squad for a Sept. 3 friendly against Germany in Duesseldorf, a match that was scheduled before the nations made it to the World Cup final in Brazil. The squad announcement is expected next week.

Martino began his career almost 16 years ago with small club Brown de Arrecifes in Argentina. After coaching other local clubs, he moved to Paraguay to manage popular clubs Libertad and Cerro Porteno.

He returned to Argentina in 2005 to coach Colon, then had another stint with Libertad before taking over Paraguay's national team in late 2006. He led the South American nation to the quarterfinals of the 2010 World Cup and to the final of the 2011 Copa America, won by Uruguay.

He revamped Newell's Old Boys after arriving in 2012, leading the Argentine club to a national title and the semifinals of the Copa Libertadores in 2013. His success with Newell's helped him land the Barcelona job, but he wasn't able to live up to expectations in Spain.

Argentina, coming off the 1-0 loss to Germany in the World Cup final at the Maracana Stadium, hasn't won a major title since the 1993 Copa America in Ecuador. The team won gold in the 2004 and 2008 Olympics, tournaments played mostly with under-23 players.