Inter Milan's run of seven successive league wins was abruptly ended on Sunday when they were crushed 4-1 at Atalanta in rain-sodden conditions.
Atalanta captain Alejandro Gomez capped the win by scoring with a spectacular dipping shot in stoppage time seconds after Inter midfielder Marcelo Brozovic had been sent off for a second bookable offence.
The defeat left Inter third in Serie A with 25 points, six behind leaders Juventus who were at AC Milan later on Sunday.
"We played and won against a team of great value," said Atalanta coach Gian Piero Gasperini, who coached Inter Milan in 2011 but was fired after only five games in charge. "This kind of performance can work as a springboard for us."
Hans Hateboer put Atlanta ahead after eight minutes, turning in Robin Gosens's cross at the far post, and the hosts would have been out of sight by halftime had it not been for Inter goalkeeper Samir Handanovic.
The Slovenian, who had already made a double save in the third minute, denied Gosens, Josip Ilicic and Rafael Toloi, the latter with a one-handed save from point-blank range, while Ilicic also missed a sitter from one metre.
Mauro Icardi levelled from a penalty two minutes after the restart but it was only a brief and ill-deserved reprieve for Inter.
Gianluca Mancini headed in from an Ilicic free kick to put Atalanta back in front after 62 minutes and Berat Djimsiti scored a similar goal in the 88th minute to ensure that justice was done.
Gomez completed Atalanta's fourth successive win with a shot which not even Handanovic could top as they climbed to seventh.
"We don't seem able to keep our concentration for long periods," Inter coach Luciano Spalletti said. "Invariably, we drop our guard and we give our opponents a few extra metres and that makes everything more difficult.
"We must accept this result, it is a game that we will take with us to learn from our mistakes and make sure that we do not repeat them."