Hakan Çalhanoğlu scored a stoppage-time equalizer and then added another goal in extra time to help AC Milan beat Torino 4-2 on Tuesday in the Italian Cup quarterfinals.

Çalhanoğlu drilled in a shot from outside the box in the first minute of stoppage time and scored what proved to be the winner in the 106th minute.

More Images
AC Milan's Hakan Calhanoglu celebrates after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Hakan Çalhanoğlu scored a stoppage-time equalizer and then added another goal in extra time to help AC Milan beat Torino 4-2 on Tuesday in the Italian Cup quarterfinals.

AC Milan's Hakan Calhanoglu, right, scores his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Milan will face Juventus in the two-legged semifinal.

Torino's Bremer Gleison celebrates scoring during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. (Fabio FerrariLapresse via AP)

Milan and its fans paid tribute to Kobe Bryant before the match.

Torino's Bremer, left, celebrates with his teammates after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

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

Torino's Bremer, left, celebrates with his teammate Nicolas Nkoulou after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Torino's Bremer, left, celebrates with his teammate Nicolas Nkoulou after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's manager Stefano Pioli gives instructions to his player Zlatan Ibrahimovic during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's manager Stefano Pioli gives instructions to his player Zlatan Ibrahimovic during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Torino's Bremer Gleison scores during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. (Marco AlpozziLapresse via AP)

Torino's Bremer Gleison scores during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. (Marco AlpozziLapresse via AP)

AC Milan's Giacomo Bonaventura, left, celebrates with his teammate Krzysztof Piatek after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Giacomo Bonaventura, left, celebrates with his teammate Krzysztof Piatek after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Giacomo Bonaventura, bottom center, celebrates with his teammates after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Giacomo Bonaventura, bottom center, celebrates with his teammates after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

A view of the screen with images in memory of devout fan Kobe Bryant, prior to the start of the Italian Cup soccer match between AC Milan and Torino, at the Milan San Siro Stadium, Italy, Tuesday, Jan. 24, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

A view of the screen with images in memory of devout fan Kobe Bryant, prior to the start of the Italian Cup soccer match between AC Milan and Torino, at the Milan San Siro Stadium, Italy, Tuesday, Jan. 24, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

AC Milan's supporter wears a jersey Kobe Bryant prior to the start of the Italian Cup soccer match between AC Milan and Torino in Milan, Italy, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

AC Milan's supporter wears a jersey Kobe Bryant prior to the start of the Italian Cup soccer match between AC Milan and Torino in Milan, Italy, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

A banner reading " Rest in peace Kobe and Gianna forever together " is displayed by AC Milan supporters during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (Marco AlpozziLapresse via AP)

A banner reading " Rest in peace Kobe and Gianna forever together " is displayed by AC Milan supporters during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (Marco AlpozziLapresse via AP)

Zlatan Ibrahimović added Milan's fourth goal two minutes later, prodding the ball into the back of the net after being teed up by Rafael Leão. It was his first goal at San Siro for Milan since 2012, having returned to the club this month.

AC Milan's Hakan Calhanoglu celebrates after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Hakan Calhanoglu celebrates after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Milan will face Juventus in the two-legged semifinal.

Ibrahimović, who came on as a second-half substitute, had a chance to make it 3-2 before the end of regulation but the 38-year-old ballooned over from point-blank range.

Brazilian defender Bremer scored both of Torino’s goals to cancel out Giacomo Bonaventura’s opener for Milan.

AC Milan's Hakan Calhanoglu, right, scores his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Hakan Calhanoglu, right, scores his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Milan and its fans paid tribute to Kobe Bryant before the match.

Bryant, who grew up in Italy between the ages of 6 and 13, was a devout Milan fan. The 18-time NBA All-Star with the Los Angeles Lakers died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California.

Both soccer teams also wore black armbands. In the 24th minute, fans around the stadium stood to applaud in tribute to Bryant, who wore No. 24.

Torino's Bremer Gleison celebrates scoring during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. (Fabio FerrariLapresse via AP)

Torino's Bremer Gleison celebrates scoring during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. (Fabio FerrariLapresse via AP)

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

Torino's Bremer, left, celebrates with his teammates after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Torino's Bremer, left, celebrates with his teammates after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Torino's Bremer, left, celebrates with his teammate Nicolas Nkoulou after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Torino's Bremer, left, celebrates with his teammate Nicolas Nkoulou after scoring his side's second goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's manager Stefano Pioli gives instructions to his player Zlatan Ibrahimovic during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's manager Stefano Pioli gives instructions to his player Zlatan Ibrahimovic during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

Torino's Bremer Gleison scores during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. (Marco AlpozziLapresse via AP)

Torino's Bremer Gleison scores during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. (Marco AlpozziLapresse via AP)

AC Milan's Giacomo Bonaventura, left, celebrates with his teammate Krzysztof Piatek after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Giacomo Bonaventura, left, celebrates with his teammate Krzysztof Piatek after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Giacomo Bonaventura, bottom center, celebrates with his teammates after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

AC Milan's Giacomo Bonaventura, bottom center, celebrates with his teammates after scoring his side's opening goal during an Italian Cup quarter finals soccer match between AC Milan and Torino at the San Siro stadium, in Milan, Italy, Tuesday, Jan. 28, 2020. (AP PhotoAntonio Calanni)

A view of the screen with images in memory of devout fan Kobe Bryant, prior to the start of the Italian Cup soccer match between AC Milan and Torino, at the Milan San Siro Stadium, Italy, Tuesday, Jan. 24, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

A view of the screen with images in memory of devout fan Kobe Bryant, prior to the start of the Italian Cup soccer match between AC Milan and Torino, at the Milan San Siro Stadium, Italy, Tuesday, Jan. 24, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

AC Milan's supporter wears a jersey Kobe Bryant prior to the start of the Italian Cup soccer match between AC Milan and Torino in Milan, Italy, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

AC Milan's supporter wears a jersey Kobe Bryant prior to the start of the Italian Cup soccer match between AC Milan and Torino in Milan, Italy, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (AP PhotoAntonio Calanni)

A banner reading " Rest in peace Kobe and Gianna forever together " is displayed by AC Milan supporters during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (Marco AlpozziLapresse via AP)

A banner reading " Rest in peace Kobe and Gianna forever together " is displayed by AC Milan supporters during the Italian Cup, quarterfinal soccer match between AC Milan and Torino at the Milan San Siro Stadium, Tuesday, Jan. 28, 2020. Bryant, an 18-time NBA All-Star with the Los Angeles Lakers and a lifelong soccer fan, died Sunday with his 13-year-old daughter, Gianna, in a helicopter crash near Calabasas, California. He was 41. (Marco AlpozziLapresse via AP)