Matt Barnes spit on his fiancee's ex during a heated altercation at the Cowboys vs. 49ers game on Sunday -- video, obtained by TMZ Sports, shows -- but the former NBA champ claims the man started it all, threatening him and shoving him.
The incident happened at around 3:40 PM just before the playoff contest began at Levi's Stadium in Santa Clara ... when Barnes encountered his fiancee's former husband, David Patterson Jr., in a concourse at the venue.
In the footage, you can see Barnes sprayed the man with spit -- before he later got in the guy's face.
The clip shows the two exchanged words and got in a bit of a wrestling match -- before, thankfully, they separated and walked off in different directions.
According to an application for a temporary civil restraining order filed by Barnes in L.A. County court two days after the incident, the NBA star alleges Patterson Jr. was the aggressor in the situation.
In the court documents, Barnes says Patterson Jr. "hunted me down and aggressively confronted me." He said the 37-year-old yelled profanities and threats at him, called him names, and incited the crowd around them "into a frenzy by yelling out my full name repeatedly."
Barnes added that Patterson Jr. eventually "shoved me, and I was forced to push him off of me." He continued, "I did not want the altercation to physically escalate further, and out of frustration with him seeking me out and his unrelenting repeated harassment I spit in his direction in disgust."
Cops tell us they were called to the scene to investigate an allegation of battery -- where they say the alleged victim ID'ed 42-year-old Barnes as the suspect. They said an investigation into the case remains ongoing.
As for Barnes' request for the TRO, he says Patterson Jr. has been terrorizing him for months -- believing the man "is jealous of my relationship with his ex-wife." He said at one point in 2022, Patterson Jr. threatened to shoot him with his gun. He's asking the court to restrict Patterson Jr. from coming within 100 yards of him.
Barnes, who played three seasons in the Bay Area with the Golden State Warriors in his NBA career, appeared to go on with his Sunday night without further incident ... seeming to be in great spirits as he watched the game from suite seats.
In fact, Barnes sounded pleased with the 19-12 Niners victory outcome, apparently winning a bet with a Dallas fan who had a spot in his box.