Neymar celebrates with teammate Filipe Luis after scoring the opening goal for Brazil against Croatia at Anfield, home of Liverpool, on Sunday. Photo: Dave Thompson/AP

LIVERPOOL – Neymar scored on his return to action after three months out through injury as Brazil warmed up for the World Cup with a 2-0 friendly win over Croatia at Anfield on Sunday.

The most expensive player in the world has been sidelined since February 25, when he fractured a metatarsal and sprained his ankle playing for Paris Saint-Germain in a French league match against Olympique Marseille.

The former Barcelona forward, key to his country’s hopes in Russia, came on as a halftime substitute and provided the moment of inspiration for win the game in the 69th minute.

Willian, impressive throughout for Brazil, picked the ball up in midfield and threaded the ball to Philippe Coutinho, who found Neymar in the inside-left channel.

The 26-year-old cut inside and skipped past two defenders before blasting the ball home off the underside of the crossbar.

Neymar’s goal was his 54th for his country, and he needs one to reach Romario as the third-most prolific Brazil striker of all time behind Pele and Ronaldo.

Another substitute, Roberto Firmino, delighted the Liverpool fans in the Anfield crowd by adding the second in stoppage-time with a well-taken lob from inside the area.

Croatia’s hard pressing had frustrated Brazil in the first 45 minutes, and they needed keeper Alisson to get down well to keep out a drive from Andrej Kramaric after Miranda gave the ball away.

But after the break, the Croatians began to defend deeper and allowed Brazil the space to begin to express themselves – a situation Neymar exploited to the full.

Brazil coach Tite had started with Coutinho on the left and Manchester City striker Gabriel Jesus at centre-forward, with Willian on the right flank.

Coutinho switched to a more orthodox midfield role after the introduction of Neymar, on the left, at the break, and Firmino played the last half-hour in the middle after replacing Jesus.

Brazil’s opening game in World Cup Group E is against Switzerland, and they also face Costa Rica and Serbia in the first round.

The five-time world champions have one more friendly before the tournament, against Austria in Vienna on June 10.