It could have all been different if Manchester City had not held on to their lead in the title race.
When Ederson tried to coolly play out from the back, he almost backfired on him, as Hearts were in mouths at one point.
Ederson tried to get the ball across his own goal line, but he sidefooted it to a teammate in the nick of time.
Despite his hair-raising brush with calamity, the Brazil international was able to make light of the incident as he posted a still image of his goal-line clearance along with a thumbs-up emoji.
View this post on InstagramA post shared by Ederson Moraes (@ederson93)
Several other players appeared in the comments section, with Joao Cancelo commending his teammate for his coldness and Joe Hart adding a couple of hand claps.
Vinicius Junior, a Real Madrid star, said that he was very nervous after watching Ederson's clearance.
HADOUKEN! 😂
— Manchester City (@ManCity) January 4, 2019
Ederson's may prove to be a pivotal moment in the title race in the same way as John Stones' goal-line clearance in a clash between the two sides back in January 2019.
On that occasion, the City defender cleared a goal-bound effort with just 11 millimetres to spare before his side won the game and went on to win the title by a single point.
Ederson was able to repeat history by narrowly evading Jota's outstretched boot at close quarters, keeping City's one-point lead at the summit with seven games remaining this season.
The two title rivals have played each other twice in the league this season, but they will face off again on Saturday in the FA Cup semifinals at Wembley. On the US side, it's on the Disney channel.