When the struggle was finished, when the job was complete, when the crowd had stopped cheering, Maria Sharapova found it difficult to idle her engine, to quiet her nerves, to rein in her emotions.

And this was a first-round match in the U.S. Open, one that felt so much more like a final.

Sharapova defeated the No. 2 seed Simona Halep on Monday night in an electric Arthur Ashe Stadium, returning to the Open for the first time since 2014. The pulsating 6-4, 4-6, 6-3 win was everything Maria: heavy serves, forcing ground strokes, hammering returns and the usual bevy of unforced errors. She was drama itself in a sparkly black dress, perfect for keeping her night match record at the Open a perfect 18-0.

This return to the Open was different from any others. Sharapova came back to competitive tennis in April after a 15-month doping ban. Because her ranking has dropped so low, she needed wild cards to get into tournaments. The French Open, where she was a past champion, denied it, citing the consequences of doping. The U.S. Open, where she was the 2006 champion, gave her one. She was ecstatic.

“I think when I found out that I received the wild card, I was obviously extremely excited,” Sharapova said after the match. “I realized how long it had been since I played at the U.S. Open [missing 2015 as well with a leg injury]. 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.”

She couldn’t have gotten a tougher draw than Halep, who had the best chance to take over the No. 1 ranking at the Open’s conclusion. This was a test of will as much as it was athleticism and Sharapova has never been in short supply when it comes to determination.

Injuries (thigh, then left forearm) had limited Sharapova to just nine matches this season and she had to pull out of hardcourt tuneup events. Her mind was into her game, but she didn’t know if her body would be.

advertisement | advertise on newsday

“I think it all just comes down to the fact that I have not spent as much time on the court. I actually a couple weeks ago did not even know if I’d be able to compete here,” said Sharapova, who plays Timea Babos in the second round at Ashe today. “So getting that MRI in Cincinnati, just looking back at August 12th, it was not a fun day. It was not a fun day getting that MRI, getting the result of it, speaking to a doctor, flying to New York, getting another opinion, with the thought that I might miss the U.S. Open. Looking back at that and seeing where I am today, it’s just, I don’t know, pretty amazing that I was able to produce that tennis because it wasn’t there in the days leading up to this tournament.”

When you think she hadn’t played at Flushing Meadows since 2014, there were three years leading up to this U.S. Open. The forced wait was worth it.

“I definitely felt the energy. I felt the crowd,” said Sharapova. “I felt it for both of us, you know. That’s what makes this great. I love that feeling, that there’s fans cheering for both players, that it’s a great match and a great level. They’re getting their evening’s worth.”