Following the final round of stops, in which his Chip Ganassi Racing team-mate Scott Dixon had led 95 laps but was penalised for speeding in the pitlane, Ericsson emerged in third behind the two Arrow McLaren SP cars of Felix Rosenqvist and Pato O’Ward.
But he passed the pair of them to take the lead, which he built up to three seconds, the biggest advantage anyone had held all day.
Then on the 194th lap, his team-mate Jimmie Johnson, making his Indy 500 debut, struck the wall at Turn 2 to bring out a red flag.
The restart left just two green-flag laps to go, and Ericsson weaved down the front straight to break the tow to keep O’Ward far enough away to try a move. It was the same situation down the back straight, but O’Ward appeared to go through Turns 3 and 4 stronger than the leader and down the front straight Ericsson couldn’t shake him off.
As he moved down to the pitwall to protect the inside, O’Ward moved fully alongside him heading into Turn 1. But as Ericsson moved right to take the racing line for Turn 1, O’Ward had to feather the throttle, and allow Ericsson to get ahead on the inside.
That loss of momentum was enough for Ericsson to pull away down the back stretch, and before he’d even turned into Turn 3, out came the caution for Sage Karam crashing in Turn 2.
And so Ericsson became only the second Swedish winner of the Indianapolis 500 after Kenny Brack and scored Chip Ganassi Racing its fifth Indy 500 win.
An elated and astonished-looking Ericsson said of the penultimate yellow that became a full race stoppage: “I couldn’t believe it. I felt you can never take anything for granted, and obviously there was two laps to go.
“I was praying so hard there was not going to be another yellow, but I knew there was probably going to be one.
“It was hard to re-focus but I knew the car was amazing, the #8 crew and Chip Ganassi Racing Honda have done such a good job, so I knew the Huski Chocolate car was fast enough.
“But it was still hard, you know? I had to do everything there and then to keep them behind.
“I can’t believe it. I’m so happy.”