MIAMI -- Paula Badosa came back to defeat Simona Halep 1-6, 6-4, 6-3 on Tuesday at the Miami Open.

The two-time Grand Slam singles champion and former World No.1 looked fit but seemed to wear down as the match wore on. Late in the third set, sitting in the changeover chair, she covered her head with a towel.

Halep scored the first breakthrough nine minutes into the match. On break point, she opened up the court, then blasted a backhand crosscourt winner to take a 2-1 lead. The fans holding several Romanian flags cheered wildly.

Later, with Badosa serving at 1-3, Halep converted her second break point with another smooth backhand into the open court. Serving at 4-1, Halep weathered the kind of grueling game that will help her get up to speed. There were nine deuces -- and four break points for Badosa -- yet Halep saved them all, inducing a Badosa forehand return miss.

Halep closed it out with her third straight break of Badosa’s serve. A crosscourt forehand winner drew a big smile and familiar fist pump.

Badosa pushed ahead, breaking Halep in the third game of the second set. She made that lead stand up the entire way, and the match was headed to a deciding third set.

Again in the third game, Badosa bested Halep’s serve to take a 2-1 lead. Halep broke back, but Badosa made it three consecutive breaks to go up 3-2 -- an advantage that held up the rest of the way.

Halep finished with 10 double faults and saved seven of 11 break points.

“I missed this,” Halep said at the beginning of a well-attended press conference. “I had emotions, but positive emotions, the crowd supporting me so nice. The level of tennis was pretty good -- unexpected for most of the people.

“I think I did a good job today. I’m happy with my first match coming back. I would rate it as a special day, honestly.”

Badosa, ranked No.80, has been struggling with injuries. She’s now 5-5 for the year.

For Halep, she  returned from an 18-month absence from the Hologic WTA Tour.

Two weeks ago, the Court of Arbitration for Sport (CAS), the top court for global sport, reduced her ban from tennis to nine months -- essentially, time served. After the ruling, Halep accepted a wild card from Miami Open tournament director James Blake.

Last week, she began practicing in Miami and posted an Instagram story.

“Feels like I never left,” Halep wrote, adding a winking emoji. “First day back, thank you @miamiopen.”

Her resume as a future Hall of Famer is already secure. She’s won more than $40 million in prize money and 24 titles, including 2018 Roland Garros and 2019 Wimbledon. Consistency has been her calling card; since 2014, she’s played in 32 Grand Slam events and reached at least the quarterfinals in 16 of them.

Halep was asked if she had set goals for this comeback.

“Very early," she said. "Actually, I didn’t know what to expect from the decision and I didn’t plan anything. I said I’m going to wait, then plan. The love for tennis brought me here. I came here and I felt again the love for sport.

“I am going home and I will need to practice harder because the level is very high these days. Tennis is very powerful, I was a little worried about how I was going to handle it. But it was not that bad. It’s just the first match.”