Kooky Kanye West threw an epic tantrum behind the scenes of “Saturday Night Live” and petulantly threatened to walk off the show during its live weekend broadcast.

Sources exclusively tell Page Six that “SNL” guru Lorne Michaels had to reason with the “Runaway” rapper to keep him from bolting from the Melissa McCarthy-hosted show as wife Kim Kardashian entered the fracas to calm a cantankerous Kanye.

“Just moments leading into the live show, and during the live show, Kanye had a meltdown and threatened to walk off,” said a source familiar with the scene.

Multiple sources told us that Kanye suddenly decided he wasn’t happy with the “SNL” set for his musical appearance, which included a video screen and not much else.

“It had something to do with the set,” said a source. “Kim, who was in the audience with Kylie Jenner, had to come down. Lorne had to personally talk to Kanye. There were a few really tense minutes” when it looked like West was walking, leaving the live NBC show in the lurch.

Another source added of West: “He freaked out about how the set was arranged. He was saying he’s ‘the greatest artist.’ He’s having regular meltdowns. Everyone’s walking on eggshells around him. He’s under a lot of stress between the new album and the fashion line.”

Michaels, the first source said, was “eerily calm” through the incident. “I guess after 41 years of doing this, he’s used to it.”

Other staffers were prepping for the worst. “They were like, ‘If this happens, and he walks, what are we going to do?’”

After the “artistic differences,” Kanye finally deigned to stay and perform.

In other unhinged behavior, after tweeting he was $53 million in debt this week, Kanye begged, “Mark Zuckerberg invest 1 billion dollars into Kanye West ideas.” He then declared of himself on Monday, in the third person, “He is the greatest living artist and greatest artist of all time,” and tweeted at Google co-founder Larry Page, “I’m down for your help too.”

Reps didn’t return calls for comment.

Kanye isn’t a tirade newbie — check out his past rants: