It didn’t feel like an opening-round match Monday night at the U.S. Open.

On a day chock-full of matches featuring plenty of players familiar only to tennis’s most well informed, two stars lit up Arthur Ashe Stadium at nightfall. Many in the crowd stood to applaud Maria Sharapova as the five-time Grand Slam champion walked on court — in an all-black ensemble that literally sparkled — to play her first match at a major in 19 months.

They applauded even louder for her opponent, the second-seeded Simona Halep.

Sharapova upset Halep, 6-4, 4-6, 6-3, in thrilling fashion, but it was still early in the first set when the sellout crowd of 23,771 seemed to drop its allegiances. The fans clapped instead at the competitive play in front of them, and, it being New York, for the sheer drama of Sharapova’s return.

They will have another chance to cheer the comeback Wednesday, when Sharapova faces Timea Babos of Hungary in the second round.

Monday was Sharapova’s first Grand Slam appearance since the 2016 Australian Open, when she tested positive for the recently banned heart medication meldonium after losing to Serena Williams in the quarterfinals. Although her suspension ended this April, she was not given a wild-card entry into the French Open. She planned to play the qualifying tournament at Wimbledon but pulled out because of a left thigh injury. Physical ailments have in fact plagued her comeback all summer — she pulled out of tournaments in Toronto and Cincinnati leading up to the U.S. Open citing a left forearm injury.

Feeling healthy again, she made her Grand Slam reappearance in New York thanks to a wild card from the U.S. Tennis Association, which gave her the spot as a courtesy to a former champion. Sharapova won the tournament in 2006, the second major title of her career.

Back on the U.S. Open’s main stage for the first time since 2014 — she missed the 2015 tournament with an injury — Sharapova played like she had scarcely missed a match.

“Well, I’ll say this,” Sharapova said after, her face still streaked with tears. “When I found out that I received the wild card, I was obviously extremely excited. I realized how long it had been since I played at the U.S. Open. Just the thought of being back here. When me and my coach first scheduled my practice on center court, actually it got moved because they had some maintenance issues. I was upset about it because I really wanted that first practice on center court. Those little things you kind of take for granted. From the moment that I’ve been here, I’ve really understood what this means to me, to be back and to be playing.

“. . . Despite not playing a lot of matches coming into this, it almost seemed like I had no right to win this match today. And I somehow did. I think that is what I’m most proud of.”

The 30-year-old tested Halep’s impressive defense with her usual brand of risky tennis. Sharapova dictated play from the outset, pummeling Halep with a big forehand and blasting her way to 60 winners (and 64 unforced errors). She broke Halep three times in the first set, eventually winning it on the Romanian’s serve with a powerful forehand return.

Sharapova now owns a 7-0 career record against Halep. Her record at Arthur Ashe Stadium at night improves to 18-0.

The stakes of the match were higher for Halep.

The second-ranked woman in the world, Halep was one of seven women in position to take the No. 1 ranking from Karolina Pliskova at the end of the tournament. She has had three opportunities since May to grab the top ranking but has failed to do so each time. As a method of self-preservation as much as anything, she has since tried to put that summit out of her mind.

“That’s tennis, I cannot say anything,” Halep said. “I gave everything I had. Today she was stronger. I have just to go and work harder, to improve in my serve more.”

Against Sharapova, the Romanian took a set and change to steady herself mentally but charged back in the middle of the second set. Down four games to one in the second, she took advantage of Sharapova’s 27 unforced errors and muscled her way through to win five straight games to even the match.

Sharapova retreated into the locker room before the third set, collected herself and reemerged in control once again.

When Halep’s final shot went long, she sunk to her knees and placed her hands over her face. She covered her mouth — almost in disbelief — and her eyes welled with tears as she jumped up to shake Halep’s hand.

“I felt like my team and I have been through a lot,” Sharapova said of her emotions on court. “To be in that moment, to be competing there, to see them with me. Tennis is a very individual sport. You feel like it’s just you most of the time out there. Since I’ve come back, I feel like I’m on a team. You know, I’m not just winning for myself, but I’m winning for everyone that has stood behind me. That is a very special feeling to have.”

More U.S. Open coverage:

Sharapova gives Open some star power — and controversy

Men’s draw lacks Novak Djokovic, which is a rarity

Federer and Nadal may meet, in the semifinals

More tennis coverage