Lionel Messi scored early and set up the winning goal as Barcelona beat Slavia Prague 2-1 for its second straight win in Group F of the Champions League on Wednesday.

Messi floated a free kick in the 57th to Luis Suárez at the far post and his shot was deflected in by Slavia forward Peter Olayinka for Barcelona's winner.

More Images
Slavia's Peter Olayinka, second right, scores an own goal past his goalkeeper during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Lionel Messi scored early and set up the winning goal as Barcelona beat Slavia Prague 2-1 for its second straight win in Group F of the Champions League on Wednesday.

Barcelona's Lionel Messi controls the ball during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Defender Jan Boril equalized for Slavia early in the second half.

Barcelona's Lionel Messi, center, celebrates with teammates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Inter beat Dortmund 2-0 in the other group game on Wednesday.

Barcelona's Lionel Messi, left, duels for the ball with Slavia's David Hovorka during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Barcelona's Lionel Messi, left, duels for the ball with Slavia's David Hovorka during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's goalkeeper Ondrej Kolar, left, makes a save in front of Barcelona's Luis Suarez during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's goalkeeper Ondrej Kolar, left, makes a save in front of Barcelona's Luis Suarez during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, third right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, third right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Earlier, Messi finished off a fast move he had started in the third minute, capitalizing on a defensive blunder to score with a left-footed low shot.

Slavia's Peter Olayinka, second right, scores an own goal past his goalkeeper during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Peter Olayinka, second right, scores an own goal past his goalkeeper during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Defender Jan Boril equalized for Slavia early in the second half.

Barcelona tops the standings with seven points from three games.

Inter Milan and Borussia Dortmund trail Barcelona by three points in a group where three heavyweights are vying for two spots in the knockout stage.

Barcelona's Lionel Messi controls the ball during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Barcelona's Lionel Messi controls the ball during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Inter beat Dortmund 2-0 in the other group game on Wednesday.

Slavia is bottom with a point.

Next, Barcelona hosts Slavia on Nov 5.

More AP soccer https://apnews.com/Soccer and https://twitter.com/AP_Sports

Barcelona's Lionel Messi, center, celebrates with teammates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Barcelona's Lionel Messi, center, celebrates with teammates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Barcelona's Lionel Messi, left, duels for the ball with Slavia's David Hovorka during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Barcelona's Lionel Messi, left, duels for the ball with Slavia's David Hovorka during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's goalkeeper Ondrej Kolar, left, makes a save in front of Barcelona's Luis Suarez during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's goalkeeper Ondrej Kolar, left, makes a save in front of Barcelona's Luis Suarez during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, third right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, third right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)

Slavia's Jan Boril, right, celebrates after scoring his side's opening goal during the Champions League group F soccer match between Slavia Praha and FC Barcelona at the Sinobo stadium in Prague, Czech Republic, Wednesday, Oct. 23, 2019. (AP PhotoPetr David Josek)