Shakhtar Donetsk stole a stunning last-gasp 2-1 win at San Siro to continue Atalanta's miserable start to their debut Champions League campaign.
The visitors to Atalanta's makeshift European home looked to be clinging on for a point after surviving a late barrage, but substitute Manor Solomon tucked in a 95th-minute winner to break Italian hearts.
Atalanta, who were thrashed 4-0 by Dinamo Zagreb in their Group C opener, started brightly and missed a penalty through Josip Ilicic before Duvan Zapata broke the deadlock.
But Moraes equalised and then Solomon struck at the death to leave Gian Piero Gasperini's men facing a tall order to reach the last 16, with Manchester City still to play home and away.
Atalanta's first big chance arrived after 16 minutes, with Ilicic ending a wonderful passage of play by feinting left inside the area and buying a foul from Sergey Krivtsov.
Ilicic himself could not beat Andriy Pyatov from 12 yards, though. The veteran goalkeeper brilliantly parried away a firm strike and watched Hans Hateboer lash the follow-up into the side-netting.
The breakthrough followed in another flurry before the half-hour mark as Mario Pasalic clattered the post and then Hateboer centred for Zapata to crash a header past the stranded Pyatov.
But Shakhtar responded superbly and levelled when Moraes coolly rounded Pierluigi Gollini and slid a finish into the net, while they might have led before the break as Marlos struck a 20-yard free-kick against the crossbar.
Zapata stabbed narrowly wide from Alejandro Gomez's cross with Pyatov's judgement again in question, then the goalkeeper blocked as the same man muscled through. Gomez's low strike was repelled in the 91st minute, too.
Referee Tobias Stieler granted Shakhtar and Dodo, just off the bench, one final counter with stoppage time seemingly up and the scrambling home defence could not clear, allowing Solomon, another substitute, to stab under Gollini.
What does it mean? Still unable to recreate Serie A form
Last week alone, Atalanta won away at Roma and Sassuolo, scoring six times in the process. It is not quite happening in the Champions League. This was a much better performance than in the humbling at Dinamo, yet they lacked the clinical touch to finish off Shakhtar, who could well be set for a shoot-out with the Croatian side for second place.
Castro's inspired substitutions
Shakhtar had to dig in for much of the second half but, rather than settle for a point, coach Luis Castro brought on Solomon and Dodo to keep Atalanta honest at the other end. It worked a treat as the two combined for a devastating final attack that changes the complexion of Group C.
Front line not firing
After 23 goals in Serie A last season and five already this term, it appeared as though Zapata had arrived on the big stage when he powered in the opener. The Colombia international was impressive throughout, as was Gomez, but their failure to beat the shaky Pyatov a second time proved costly.
Atalanta host Serie A strugglers Lecce this weekend as they look to continue a fine start to the domestic season before turning attentions back to this competition later in the month with a trip to Manchester. Shakhtar go to Dnipro on Sunday, while their next potentially pivotal European fixture is at home to Dinamo.