Paulo Dybala scored two late goals as Juventus came from behind to beat Lokomotiv Moscow 2-1 in the Champions League on Tuesday.

Alan Miranchuk gave Lokomotiv the lead on the half-hour mark as the Russian team threatened to pull off one of the biggest upsets of the season in the competition.

More Images
Juventus' Paulo Dybala celebrates with his teammates after scoring a goal during the UEFA Champions League group D soccer match against Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Paulo Dybala scored two late goals as Juventus came from behind to beat Lokomotiv Moscow 2-1 in the Champions League on Tuesday.

Juventus' Paulo Dybala, right, and Lokomotiv Moscow's Vedran Corluka in action during the UEFA Champions League group D soccer match at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Atlético also left it late, with substitute Álvaro Morata scoring in the 78th to give the Spanish side a 1-0 home victory against Bayer Leverkusen.

Juventus' Cristiano Ronaldo, right, jumps for the ball during the UEFA Champions League group D soccer match against Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

And Bonucci was immediately at fault at the other end as he misjudged a long ball, allowing Miranchuk to pick out an unmarked Joao Mario. His shot was parried by Juventus goalkeeper Wojciech Szczesny but the ball came out to Miranchuk, who thumped it into the top right corner.

Lokomotiv Moscow celebrate after scoring a goal during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

They finally did when Juan Cuadrado found Dybala and the Argentina international curled a strike into the top left corner.

Lokomotiv Moscow's Aleksej Mirancuk, center, celebrates with his teammates after scoring a goal during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Lokomotiv Moscow's Aleksej Mirancuk, center, celebrates with his teammates after scoring a goal during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Lokomotiv Moscow's Aleksej Mirancuk (not seen) scores as other players watch the ball during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Lokomotiv Moscow's Aleksej Mirancuk (not seen) scores as other players watch the ball during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Juventus' coach Maurizio Sarri with Lokomotiv's coach Yuri Semin (L) prior the UEFA Champions League group D soccer match Juventus FC vs Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Juventus' coach Maurizio Sarri with Lokomotiv's coach Yuri Semin (L) prior the UEFA Champions League group D soccer match Juventus FC vs Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

But Dybala levelled in the 77th minute and doubled his tally two minutes later to help Juventus keep pace with Atlético Madrid at the top of Group J.

Juventus' Paulo Dybala celebrates with his teammates after scoring a goal during the UEFA Champions League group D soccer match against Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Juventus' Paulo Dybala celebrates with his teammates after scoring a goal during the UEFA Champions League group D soccer match against Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Atlético also left it late, with substitute Álvaro Morata scoring in the 78th to give the Spanish side a 1-0 home victory against Bayer Leverkusen.

Lokomotiv is four points behind Juventus and Atlético.

Juventus started well and pinned Lokomotiv back in its own half but struggled to really test goalkeeper Guilherme. Leonardo Bonucci missed a good chance when he met a Miralem Pjanic free kick with a glancing header that went wide.

Juventus' Paulo Dybala, right, and Lokomotiv Moscow's Vedran Corluka in action during the UEFA Champions League group D soccer match at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Juventus' Paulo Dybala, right, and Lokomotiv Moscow's Vedran Corluka in action during the UEFA Champions League group D soccer match at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

And Bonucci was immediately at fault at the other end as he misjudged a long ball, allowing Miranchuk to pick out an unmarked Joao Mario. His shot was parried by Juventus goalkeeper Wojciech Szczesny but the ball came out to Miranchuk, who thumped it into the top right corner.

Juventus did have the ball in the back of the net at the end of the first half but play had already been stopped for a foul by Cristiano Ronaldo on the goalkeeper and so Dybala's effort was ruled out.

Juventus coach Maurizio Sarri brought on Gonzalo Higuain at the start of the second half but it was more of the same from the hosts who dominated possession but couldn't find a way past the Russian team's backline.

Juventus' Cristiano Ronaldo, right, jumps for the ball during the UEFA Champions League group D soccer match against Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Juventus' Cristiano Ronaldo, right, jumps for the ball during the UEFA Champions League group D soccer match against Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

They finally did when Juan Cuadrado found Dybala and the Argentina international curled a strike into the top left corner.

And Dybala turned the match around completely two minutes later, firing in the rebound after Alex Sandro's powerful effort was parried by Guilherme.

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

Lokomotiv Moscow celebrate after scoring a goal during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Lokomotiv Moscow celebrate after scoring a goal during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Lokomotiv Moscow's Aleksej Mirancuk, center, celebrates with his teammates after scoring a goal during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Lokomotiv Moscow's Aleksej Mirancuk, center, celebrates with his teammates after scoring a goal during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Alessandro Di MarcoANSA via AP)

Lokomotiv Moscow's Aleksej Mirancuk (not seen) scores as other players watch the ball during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Lokomotiv Moscow's Aleksej Mirancuk (not seen) scores as other players watch the ball during the UEFA Champions League group D soccer match against Juventus FC at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Juventus' coach Maurizio Sarri with Lokomotiv's coach Yuri Semin (L) prior the UEFA Champions League group D soccer match Juventus FC vs Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)

Juventus' coach Maurizio Sarri with Lokomotiv's coach Yuri Semin (L) prior the UEFA Champions League group D soccer match Juventus FC vs Lokomotiv Moscow at the Allianz Stadium in Turin, Italy, Tuesday, Oct. 22, 2019. (Andrea Di MarcoANSA via AP)