Anthony Randolph briefly became Enemy No. 1 for Knicks fans after he tangled with Kristaps Porzingis during a 2017 EuroBasket quarterfinal contest. He didn’t realize how far some demented fans would take it.

Randolph, speaking to The Undefeated, talked about his on-court donnybrook last week with Porzingis and some of the racially motivated threats he received on social media afterward.

“The nights and days following that incident I had Latvian fans, Turkish fans and people from all over, people in New York, leaving comments on my page calling me the ‘N-word,’” Randolph said. “They were saying I was trash and that if I come to New York they would kill me. It was pretty interesting. I didn’t respond to anybody or waste my energy on stuff like that.

“It was confusing to think that people would feel that strongly about a grown man that they probably have never met. I understand the fans feel a certain type of way about their favorite players. I just took it as motivation. I think it helped me focus to play in the next game and want to win the gold even more.”

Randolph, who was a first-round pick by the Warriors in 2008 and played for four teams — including the Knicks — represented Slovenia in the tournament because each country was allowed to invite one non-citizen to join the roster. His team, which included Heat point guard Goran Dragic and potential No. 1 pick in the 2018 draft Luka Doncic, beat Porzingis and Lativia in the quarterfinals.

Porzingis and Randolph got into an altercation under the basket during the game. Randolph was ejected.

“We got tangled up and I tried to get untangled from him,” Randolph told The Undefeated. “I turned around and he was coming at my face. The first thing I could think of is, ‘What is going on?’ It was an intense game. I just told him, ‘You got a problem.’ There is no point in talking here. It’s a basketball game at the end of the day.

“It’s not like we are going to fight on the court. How many fights have you seen happen on the court, the way they control it? It’s a waste of time. At the end of the day, he’s a great player and great talent. Things that he has done in the league have been pretty special.”

Randolph and Slovenia went on to defeat Spain in the semifinals and Serbia in the finals to claim the EuroBasket championship. The 28-year-old is slated to play with Real Madrid in Spain this season, but said he would consider a multi-year offer from an NBA team. He has an opt-out clause in his contract.