BARCELONA, Spain — Lionel Messi has joined Cristiano Ronaldo in the exclusive club of players who have scored 100 goals in European competition.

Messi hit the century mark in UEFA club competitions on Wednesday when he scored from a free kick to lead 10-man Barcelona to a 3-1 victory at home over Olympiakos.

Messi curled his strike over the wall in the 61st minute. Goalkeeper Silvio Proto got a hand on the ball but couldn't keep it out as Messi took his career tally in the Champions League to 97 goals. His other three were in the European Super Cup.

Messi managed the feat in 122 European matches, 21 fewer than Ronaldo needed to score his 100th European goal in April. In total, Ronaldo has now scored 113 times in 151 European club matches after his goal earned Madrid a 1-1 draw with Tottenham on Tuesday.

The next highest scoring player in European competition after Ronaldo and Messi is former Real Madrid forward Raul Gonzalez, who scored 76 times.

"The numbers reinforce what we see day in, day out," Barcelona coach Ernesto Valverde said. "(Messi) keeps on hitting milestones that before seemed impossible."

After Barcelona had gone ahead thanks to an own-goal by Dimitris Nikolaou in the 18th, the hosts were left a man down three minutes before halftime after Gerard Pique got a second booking for using his arm to steer the ball into the net. The strike was disallowed.

However, Barcelona continued to outclass the Greek visitors despite playing with 10 men.

Messi drew a foul from Nikolaou near the edge of the area to set up his free kick. Messi's strike gave him 18 goals in 17 matches for Barcelona and Argentina this season.

Messi also set up left back Lucas Digne to score in the 64th when he dribbled around a defender before cutting the ball back through the area for the defender to drive it home.

"We knew what we were going to face, coming here to play a team like this," Olympiakos coach Takis Lemonis said. "The second goal really set us back, and followed a foul that we could have avoided. Two minutes destroyed our hopes."

Nikolaou scored Olympiakos' consolation goal with a header from a corner in the 90th.

Barcelona made it three wins from as many matches to lead Group D with nine points. It also extended its unbeaten run at home in the competition to 23 straight games.

Olympiakos remained with zero points. Juventus has six points and Sporting Lisbon three after Juventus beat the Portuguese side 2-1 also on Wednesday.

Barcelona dominated possession and the scoring chances throughout a game at Camp Nou that started under heavy rain.

Forward Gerard Deulofeu caused Olympiakos problems with his incursions and crosses from the right side until he was substituted at halftime for defender Javier Mascherano. Offseason arrival Paulinho continued to impress with his runs into the area to join the attack from midfield.

Barcelona pressed Olympiakos into its area from kickoff and its first goal came when Deulofeu used one touch to send in a cross that Nikolaou clumsily turned into his own net.

Paulinho hit the crossbar with an acrobatic header in the 25th, and Olympiakos would have conceded more goals if not for Proto, who denied several shots by Deulofeu, Messi and Luis Suarez.

Deulofeu appeared to have set up another goal in the 42nd when his shot was saved by Proto and fell to Pique in front of the goalmouth, only for the player's arm to lead to a red card.

"We are satisfied. We were able to open the match by scoring early and we overcame the difficulty of the sending off," Valverde said.

Valverde coached Olympiakos from 2008-09 and 2010-12, guiding it to three Greek league titles.

The match was played amid growing political tension between Spain's government and regional leaders of Catalonia, whose capital is Barcelona. Some Barcelona fans chanted during the game in favour of independence for Catalonia from the rest of Spain and the release of two leaders of separatist grassroots groups who were jailed on suspicion of sedition this week.

___

More AP Champions League coverage: https://apnews.com/tag/ChampionsLeague