So that’s what it took to inspire the Indiana Pacers? Frank Vogel getting ejected?

His team was going nowhere fast when the coach erupted and exited in the third quarter Tuesday night at Bankers Life Fieldhouse.

Pacers point guard George Hill said his coach’s first ejection of the season showed how far their leader was willing to go to inject intensity in lackluster players.

Indiana improbably woke up and erased a 20-point deficit in the final quarter, much of it on a 17-0 run, then made the key plays at the end for a 99-94 comeback victory over the Cleveland Cavaliers.

The Pacers outscored the stunned Cavaliers 35-10 in the final quarter, including 31-6 in the final 8 minutes, 40 seconds.

“That don’t mean nothing in the NBA; 20 points can go by like that,” Hill said, snapping his fingers. “As we showed tonight, no lead is safe in the NBA.”

Hill, who scored a team-high 27 points, factored into perhaps the most important basket in the final seconds as he drew the Cavaliers to him and fed All-Star forward Paul George for an open 3-pointer from the corner.

George had struggled much of the night with misses on six of his first seven shots. But like his team, he came to life late.

“I just had a lot of time,” George said. “I told myself as that ball was traveling towards me, ‘This one has got to go down.’ ”

It did. The Pacers led 96-94 with 29.9 seconds left.

Cleveland point guard Kyrie Irving, who had carved up a slow-adjusting defense for 23 of his 29 points through three quarters, drove inside and banked in a shot.

But he ran over backup center Jeff Pendergraph and the resulting charge canceled the score.

“If we would have had a game ball, it definitely goes to Pendergraph,” George said of the pivotal play. “That’s just guts, man.