Milinkovic-Savic, who was making his comeback from an injury, broke the deadlock in the 82nd minute by heading in a corner. Joaquin Correa doubled Lazio’s lead following a counterattack in the final minute as Atalanta pressed for the equalizer.

Marten de Roon had hit the post for Atalanta in the first half in an entertaining, high-tempo match. His shot took a deflection off the hand of Lazio defender Bastos, but the video assistant referee deemed it to be involuntary as it was too close range.

Atalanta coach Gian Piero Gasperini was furious after being shown a replay of the incident during a television interview after the match.

“I wasn’t angry before I saw that replay, as from the bench I absolutely didn’t see that,” he said. “But it’s a very serious error. It’s a shot that’s going in. It is unacceptable.

“If there hadn’t been VAR, then that’s understandable. But no, this is unjustifiable.”

It was Simone Inzaghi’s first Italian Cup victory as coach, having won the competition as a player with Lazio three times.

The win also salvaged a disappointing season for Lazio, after the club’s hopes of qualifying for the Champions League ended with a recent loss to Atalanta.

“It’s a great night, in front of amazing fans,” Inzaghi said. “But honor to Atalanta, too. It was a really great game, decided by episodes that this time we knew how to turn to our advantage.

“It’s a satisfaction that we deserve because of the path we’ve taken. We wanted this cup win. We gave our all to win it and now we’ll enjoy it.”

Several of the Atalanta players were in tears after the final whistle. The team from the small northern city of Bergamo has won the Italian Cup only once, back in 1963.

It was Lazio’s seventh Italian Cup victory and also ended four years of Juventus domination. Lazio lost to Juventus in two of those finals.

Atalanta can console itself by fulfilling its other ambition, of qualifying for the Champions League for the first time.

The team is on an 11-match unbeaten run in the league and that has lifted it up to fourth place in Serie A and the final Champions League qualifying spot.

Atalanta has a three-point advantage over AC Milan and Roma with two matches remaining.