Pol Lirola’s late goal gave 10-man Fiorentina a 2-1 win over Atalanta on Wednesday and a place in the Italian Cup quarterfinals.

Lirola hit an angled shot into the bottom left corner in the 84th minute to help Fiorentina eliminate last season’s runner-up.

Fiorentina will face Inter Milan in the next round.

Fiorentina's Patrick Cutrone celebrates after scoring his side's first goal during an Italian Cup eightfinal soccer match, between Fiorentina and Atalanta at the Artemio Franchi stadium in Florence, Italy, Wednesday, Jan. 15, 2020. ( Jennifer LorenziniLaPresse via AP)

Fiorentina's Patrick Cutrone celebrates after scoring his side's first goal during an Italian Cup eightfinal soccer match, between Fiorentina and Atalanta at the Artemio Franchi stadium in Florence, Italy, Wednesday, Jan. 15, 2020. ( Jennifer LorenziniLaPresse via AP)

Patrick Cutrone had given Fiorentina an early lead with his first goal since joining the club from Wolverhampton Wanderers last week.

Atalanta twice hit the crossbar before Josip Iličić leveled in the 67th minute. And it seemed as if the match had turned three minutes later when Fiorentina defender Germán Pezzella was shown a second yellow card, for diving, and sent off.

However, the home side managed to find a winner despite being a man down, sparking celebrations on the Fiorentina bench.

Fiorentina's Patrick Cutrone celebrates after scoring his side's first goal during an Italian Cup eightfinal soccer match, between Fiorentina and Atalanta at the Artemio Franchi stadium in Florence, Italy, Wednesday, Jan. 15, 2020. ( Jennifer LorenziniLaPresse via AP)

Fiorentina's Patrick Cutrone celebrates after scoring his side's first goal during an Italian Cup eightfinal soccer match, between Fiorentina and Atalanta at the Artemio Franchi stadium in Florence, Italy, Wednesday, Jan. 15, 2020. ( Jennifer LorenziniLaPresse via AP)

AC Milan was playing Spal later, before Juventus hosts Udinese.

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

Fiorentina president Rocco Commisso gestures prior to an Italian Cup eightfinal soccer match, between Fiorentina and Atalanta at the Artemio Franchi stadium in Florence, Italy, Wednesday, Jan. 15, 2020. ( Jennifer LorenziniLaPresse via AP)

Fiorentina president Rocco Commisso gestures prior to an Italian Cup eightfinal soccer match, between Fiorentina and Atalanta at the Artemio Franchi stadium in Florence, Italy, Wednesday, Jan. 15, 2020. ( Jennifer LorenziniLaPresse via AP)