MILAN — Inter Milan is back in the Champions League.
The Nerazzurri trailed 2-1 with 13 minutes left but fought back to beat 10-man Lazio, 3-2, and secure a spot in Europe's premier club competition for the first time since 2012, following Matias Vecino's late header.
"The Champions League has been our aim since the beginning of the season," Inter captain Mauro Icardi said. "We were aware of our strength from the start and finally we did it — after a crazy match."
Inter moved fourth with the same number of points as Lazio but with a better head-to-head record. Champion Juventus, Napoli and Roma are the other Italian teams to qualify for the Champions League.
Several Lazio players were in tears after the final whistle.
"We should have probably sealed the Champions League place earlier and not needed to do this in this last match," Lazio coach Simone Inzaghi said.
"Evidently it was destiny. A night like this will remain inside us for a long time."
This was the first year Italy had four spots in the Champions League and the final berth came down to the last match of the season, with Lazio leading Inter by three points.
It was a thrilling match at a sold-out Stadio Olimpico.
Lazio took the lead when Adam Marusic's strike smacked Ivan Perisic in the face and ricocheted into the far bottom corner.
The hosts almost doubled their advantage but Sergej Milinkovic-Savic's free kick came off the post, and Inter leveled in the 29th.
A corner came through to Danilo D'Ambrosio and, although Thomas Strakosha saved his initial attempt, he managed to hook his leg around the goalkeeper to turn it over the line.
Lazio restored its lead four minutes from the break as Senad Lulic threaded a ball through for Felipe Anderson to race forward and fire into the bottom left corner.
Inter was awarded a penalty in the 72nd for a handball by Milinkovic-Savic but the referee changed his mind after seeing the incident again on video review.
The visitors did get a penalty shortly after when Stefan de Vrij, who is set to join Inter next month, fouled Mauro Icardi.
"If someone else had done that foul, nothing would have changed, it was an accident," Inzaghi said. "I would play him again 100 times, he had a great match."
Icardi converted to take his tally to 29 for the season, level with Lazio forward Ciro Immobile at the top of the goalscoring charts.
Lulic was sent off following a second yellow card and the turnaround was complete when Vecino headed in a corner nine minutes from time.
There was no great escape for Crotone this year as it lost 2-1 at Napoli on Sunday in the final round of the Serie A season to drop to Serie B.
Crotone avoided relegation last year on the final day with victory at Lazio after picking up 20 out of 27 points.
Crotone knew that a result at Napoli would give it the chance to escape relegation again.
However, goals from Arkadiusz Milik and Jose Callejon gave Napoli the win as it finished the season with a club record of 91 points. Marco Tumminello scored a late consolation for Crotone.
Napoli, which finished second to Juventus, became the first Serie A side to reach 90 points and still not win the title.
In the end, Crotone's result did not matter as other relegation-threatened clubs — Spal, Cagliari, Chievo Verona and Udinese — all won.
AC Milan was already assured of a spot in the Europa League but made certain of avoiding the qualifying round after coming from behind to crush Fiorentina 5-1.
Elsewhere, Roma won 1-0 at Sassuolo and Torino beat Genoa 2-1.