Step aside, Nick Kyrgios.

The U.S. Open has a new villain.

Russian Daniil Medvedev became a Flushing enemy Friday night. In the first set, he ripped a towel from a ball person’s hands, drawing a code violation, threw his racket in the direction of the chair umpire and was seen on the big screen flashing his middle finger by the side of his head.

The fifth seed survived Spaniard Feliciano Lopez, 7-6 (1), 4-6, 7-6 (7), 6-4, but likely will face the crowd’s ire the rest of his stay at the tournament. After his tantrum, the Louis Armstrong Stadium crowd got behind Lopez, cheering for every point he won and furiously booing Medvedev.

“I was in the heat of the moment, starting losing the momentum,” the 23-year-old Medvedev said. “It was tough. And I paid for it the whole match after.

“What I can say is I’m working on myself and hopefully will be better next time,” he added.

In his on-court interview, he seemed to revel in his role as the villain, and challenged fans for more boos.

“First of all, what can I say? Thank you guys, because your energy tonight gave me the win,” Medvedev said, speaking directly to the fans like he was a wrestling heel. “If you weren’t here, guys, I would probably lose the match. I was so tired. I want all you to know when you sleep tonight I won today because of you.

“The energy you’ve given me right now, guys, I think it will be enough for my five next matches. The more you do this, the more I will win for you guys. Thank you.”

Unseeded German Dominik Koepfer, Medvedev’s fourth-round opponent, probably just gained a lot of fans for at least his next match.

Japan’s seventh-seeded Kei Nishikori — who made the 2014 U.S. Open finals — was the latest victim in this year’s upset-riddled men’s field.

No. 38 Alex De Minaur pulled out a 6-2, 6-4, 2-6, 6-3 win in the third round.

De Minaur, 20, wore Nishikori out from the baseline to move on to the Round of 16, where he will play Grigor Dimitrov.

“Oh, it was amazing. I’ve been in this situation before, and this is where I want to be. This is where I feel like my game’s at,” De Minaur said. “I want to be pushing these guys, I want to be pushing second weeks of Grand Slams and putting myself out there. So very happy.”

The 29-year-old Nishikori had reached a final and two more semifinals at the U.S. Open, but made 60 unforced errors in a sloppy match.

No. 4 Dominic Thiem, No. 8 Stefanos Tsitsipas, No. 9 Karen Khachanov and No. 10 Roberto Bautista Agut have all been knocked out, with the men’s draw suddenly sprung wide open.

No. 3 Karolina Pliskova had to beat both her foe and her own nerves, getting by Ons Jabeur 6-1, 4-6, 6-4.

Pliskova appeared frustrated when Jabeur — who got treatment on her knee at the end of the first set — came out strong in the second. Pliskova smashed her racket and got a warning from the chair umpire. But she eventually settled in for the win.

“Just got in trouble maybe more because of me than her,” Pliskova said. “Of course her game is … once you’re not feeling great and her game is not super nice to play because she plays everything. I don’t even know if she knows what she’s playing, and yeah, then was quite difficult.

“In the end, good. It was big fight. Not for sure the best feeling, but I won, which is good.”

The win sets up a match against No. 16 Johanna Konta, who beat Zhang Shuai. Pliskova is 4-1 against the 28-year-old Brit, including a win in this year’s Rome final. But Konta is in form, having made the semis at Roland Garros and quarters at Wimbledon.

Pliskova got in some culture before the Open started, seeing both “Pretty Woman” and “Frozen” on Broadway. She preferred the latter.

Asked between herself and twin sister, Kristyna, which is the Anna and which is the Elsa, she replied, “That’s tough to say. I’m not going to say I’m Elsa, but I’d love to be maybe.”

Teens are all the rage at this year’s Open.

Martin Damm, just 15, and 16-year-old Toby Kodat beat fellow Americans Mitchell Krueger and Tim Smyczek 7-6 (6), 7-5 in men’s doubles on Thursday. It made them the youngest team to win a men’s doubles match at the U.S. Open in the professional era.

The only younger men’s doubles team in the Open era was when John McEnroe (then 16) teamed up with 15-year-old Larry Gottfried in 1975, according to the USTA. They got a first-round walkover and lost in the next round.