9:47 AM PT -- Sources tell TMZ, Nicki's rant on the "American Idol" set went beyond mere name-calling Tuesday ... the rapper also threatened Mariah's life, saying, "If I had a gun, I would shoot her."

Nicki Minaj derailed the "American Idol" auditions in Charlotte, North Carolina Tuesday, after swearing at Mariah Carey and threatening, "I'm gonna knock you out" ... but Mariah FIRED RIGHT BACK with insults of her own.

In the footage, obtained by TMZ, Nicki is clearly furious ... shouting, "I told them I'm not f*ckin' putting up with her f**kin' highness over there."

Mariah can be heard saying, "“Oh why, WHYYYY .do I have a three year old sitting around me?”

Carey continues, "I can’t see my kids, because you decided to act like a little crazy bitch and go all around the stage.”

Sources say Nicki later threatened to "knock out" Mariah ... but she said it before the video starts.

It all went down while the two were sitting at the judge's table ... with Keith Urban sitting in between them and Randy Jackson sitting on the far end, next to Mariah.

We're told the whole thing exploded over a disagreement over a contestant's performance.

Listen closely as you play the video ... you'll hear

Nicki: Think I'm playin? Think this sh*t is a f*cking joke? Think it’s a joke? Think it’s a joke? Think it’s a joke? Say one more disrespectful thing to me, if you say one more disrespectful thing to me -- off with your head!

Mariah: I am not being disrespectful.

Nicki: Off with your head, off with your head.

Nicki: Don’t tell me I'm insecure, don’t tell me I'm inadequate ... you gonna get sent [inaudible] just fall back; don’t ... you don’t know [inaudible] I don’t feel inadequate. You’re the insecure one sittin' up there running down her resume every five minutes.

Nicki: Every time you take a shot at me I'ma take it back, and if you gotta f*cking problem then handle it. I told them, I'm not f*cking putting up with your f*cking highness over there ... figure it the f*ck out. Figure it out.

Mariah: whyyyy, whhyyyyy ...

Nicki: Figure it out

Mariah: ... do I have a 3-year-old sitting around me???

Nicki: I’m not sitting here for 20 minutes and having you run down your resume everyday, No! Goodbye!

Mariah: Listen ... I can’t see my kids because you decided to make ... to have ... to have a little baby fit and going all around the stage.

Nicki: Good, well then go see them now, go see them now ... you’re boring as f*ck, you’re boring as f*ck.

According to our friends at MouthToEars.com, producers ended the auditions for the day so the two judges could cool down. We've confirmed that happened.