Noam Galai/Getty Images

A female police officer saved singer Mario's life during a tense encounter in Miami earlier this year.

Mario was nearly shot dead by Miami police officers -- until a female officer recognized him and ordered her colleagues to put their weapons down.

The "Let Me Love You" crooner told the New York Post's gossip column Page Six that, back in March, he was driving in Miami with a friend who has a license to carry a concealed gun, when his pal got into an argument with another man.

"(My friend) pulled out a gun and so did the other guy, so I got out to defuse the situation," Mario said, adding that his pal's baby daughter was in the back seat at the time.

"My boy got in his car, he put his gun in the armrest, and then he went to this building to use the bathroom and left the gun."

FayesVision/WENN.com

Mario didn't realize a witness called the cops, who arrived at the scene when he was in the car - along with his friend's firearm.

"So I'm in the car; the gun's right there," he said, adding the child was still in the car. "Two cops came up to the car with their guns drawn, shouting. I forgot about the gun that was in the armrest, (so) when they asked me if there were any guns in the car, I said, 'No there's no guns in the car'."

According to the hitmaker, the officers drew down on him, their fingers on the triggers, until, "this lady cop appeared and was like, 'Wait, wait, wait. Aren't you Mario?' And I was like, 'Yeah.' But I forgot about being Mario at this point. I'm just like, 'Please don’t shoot me.'"

He said: "From there, she told the guys to put their guns down... So yes, I've experienced racism, but I've also experienced privilege as an artist... As an artist, I will say we do have privilege... Whether it is sports, entertainment, we see power in all these different spaces, but with that also comes privilege."