NFL star Earl Thomas is lucky to be alive after cops say his wife held a loaded gun less than a foot from his head ... after she allegedly caught him cheating with another woman.
It's all spelled out in court documents obtained by TMZ Sports ... detailing a violent April 13 altercation involving the Baltimore Ravens player, Nina Thomas and several other people.
The Austin Police Dept. responded to a home in the Austin, Texas area at 3:41 AM after getting a call about a disturbance.
When cops arrived, they say "we observed that a black female wearing an orange sweater with a knife in her hand, later identified as Nina Thomas, was chasing a shirtless black male, later identified as Earl Thomas, with a pistol in his hand around a vehicle."
Cops drew their weapons and ordered both Nina and Earl to the ground -- and they complied without incident. That's when the investigation began and things got WILD.
Here's Nina's story, according to court docs ...
Nina claims Earl, 30, left their home earlier in the day after an argument over the NFL player's drinking. She claims Earl's brother, Seth Thomas, picked him up.
But, a short time later, she decided to check on his whereabouts by logging into his Snapchat account -- and that's when she says she found video of Earl with another woman.
Nina says she used Earl's Snapchat account to track his location to a nearby Airbnb rental home ... and says she called up two other women to help her confront Earl at the pad. Nina also claims she grabbed Earl's pistol, a 9mm Berreta, in the process with the intention to "scare him."
When the women arrived at the house, they "discovered Earl and Seth naked in bed with other women."
That's when Nina admits she pulled out the gun and put it to Earl's head -- stating "that she took out the magazine thinking that the gun could not fire." But, cops say Nina was "unaware that the gun had a round in the chamber."
Cops say one of the women in the house shot cell phone video of the incident ... which they say shows Nina pointing the gun at Earl's head "from less than a foot away and it can clearly be seen that Nina's finger was on the trigger and the safety is disengaged."
Fortunately for Earl, cops say the Ravens defensive back was able to wrestle the gun away from her.
Cops say the cell phone video also shows Nina striking Earl in the nose before it ends.
Cops also spoke with Earl, who essentially corroborated the story ... adding that Nina repeatedly hit him while he attempted to take the firearm away.
In an interview with Earl's alleged mistress at the scene, she claimed Nina also threatened her and the other woman in the house -- pointing the gun at them and yelling "I got something for all you hoes!"
The woman claims one of Nina's other friends was carrying a knife and swinging it aggressively during the altercation as well.
After speaking with everyone, cops ultimately arrested Nina and both members of her posse. Nina was booked for burglary of a residence with intent to commit aggravated assault with a deadly weapon -- family violence, and later bonded out.
Earl was NOT arrested.
Court records show Nina was also hit with an emergency protective order ... requiring her to stay 200 yards away from Earl and his alleged mistress.
When contacted by TMZ Sports, Nina's attorney, Jonathan Goins, told us, "I am here to declare that my client unequivocally and categorically denies these allegations and we look forward to our day in court where we can clear her good name."
We also reached out to Earl Thomas for comment before we published the story -- and he released a statement on social media.
"Instead of talking about us, just keep us in y'all prayers," Thomas says. "Stuff like this happens. We try to live the best lives we possibly can. Sometimes it doesn't go as planned."