BARCELONA, Spain - Neymar and Lionel Messi each scored for a fifth consecutive game to help Barcelona to a 3-1 victory over Ajax in the Champions League on Tuesday as the Spanish giant returned to winning ways in Europe.

Messi started an outstanding performance at Camp Nou by setting up Neymar in the seventh minute before the Argentine scored in the 24th.

Messi's 69th career goal in Europe's top-tier competition moved him to within two goals of Raul Gonzalez's all-time record of 71. He is tied with Cristiano Ronaldo before Real Madrid visits Liverpool on Wednesday.

Anwar El Ghazi pulled one back for Ajax in the 88th, while fellow substitute Sandro Ramirez struck in stoppage time for the hosts.

Messi said his partnership with Neymar would only get better.

"We both bring goal-scoring to the team and we are understanding one another on the pitch more and more," Messi said. "We could have scored another goal to finish off the match. Later it got a little complicated, but that's the Champions League."

Barcelona, which had lost 3-2 at Paris Saint-Germain in its previous match, has six points from three games in Group F.

PSG remained top of the group with seven points after Edinson Cavani scored three minutes from time to grab a 1-0 win at APOEL in Cyprus. Ajax is third with two points while APOEL has one.

Barcelona can now focus on its Spanish league clash at Real Madrid on Saturday, when it will look to strengthen its lead while Messi hunts for one goal to equal Telmo Zarra's all-time league record of 251 goals.

"We were obliged to take the three points after losing in Paris," said Barcelona's Andres Iniesta, who set up Messi's goal and almost scored one of his own.

"We are arriving in good form for the 'clasico' and it will be a good game to keep alive our aspirations to win it all."

Messi and Neymar continued their scoring connection to put Barcelona on its way before the half-hour mark, and only the woodwork, some sound goalkeeping and the two stars being substituted saved Ajax from a bigger defeat.

After some leisurely back-and-forth passing at the start, Messi sparked Barcelona's opener by suddenly changing pace to weave together a quick passing combination with Pedro Rodriguez before picking out Neymar on the left. The Brazil striker used his right foot to curl the ball beyond goalkeeper Jasper Cillessen and increase his team-leading tally to 10 goals this season, while Messi recorded his team-best ninth assist.

Ajax coach Frank De Boer, a former Barcelona defender, compared Messi and Neymar to Madrid's Ronaldo and Gareth Bale, saying "they play like they are from another world.

"But I am disappointed because we can play much better. For me, the problem was we had too much respect for our rival. That's why I was angry at halftime. Their first goal was fantastic. That's why they are the best in the world, Messi gave a great assist and Neymar finished it. But the second goal is a lapse on our part."

Messi added his ninth goal of the campaign when Barcelona won possession in midfield. Messi surged forward and used his right boot to control Iniesta's crisp and perfectly-timed pass to meet his run before tapping the ball beyond Cillessen with his left. The goalie got a touch on the ball but not enough to stop it from trickling over the line.

Pedro sent Messi's pass off the post in the 29th, and Iniesta was denied by Cillessen 10 minutes later.

Coach Luis Enrique substituted Neymar, Messi and Iniesta in the second half to rest them for the match at Madrid.

El Ghazi went on in the 73rd and scrambled home a loose ball before Sandro got his goal to ease the late jitters among the home crowd.