Serena Williams had confirmed last week through a spokesman that she is pregnant, but Monday brought her first direct comments on the happy news. The 35-year-old posted a love letter to her unborn child on social media, one in which she celebrated some other happy news: her return to No. 1.

That stay will be brief, as Williams, who gained the No. 1 ranking when she won the Australian Open in January, has not played since then and, in the wake of her pregnancy, will take the rest of the season off. Since that triumph, in which Williams earned her 23rd Grand Slam singes title, a record for men and women in the Open era, she slipped to No. 2 behind Germany’s Angelique Kerber, but a quirk in the WTA schedule pushed her back up.

With Williams idle, Kerber will regain the top spot as soon as she wins a couple more matches, but in the meantime, Williams was “so happy to share being number one in the world” with her unborn child. She also confirmed that she will return to competition after giving birth, writing, “I can’t wait for you to join the players box next year.”

“My Dearest Baby, You gave me the strength I didn’t know I had,” Williams wrote. “You taught me the true meaning of serenity and peace. I can’t wait to meet you. . . . From the world’s oldest number one to the world’s youngest number one. — Your Mommy.”

Williams became the oldest women to reach No. 1 in the WTA rankings in 2011, when she was 31. She first hit the top spot in July 2002, and she has held that position a total of 317 weeks, behind only Steffi Graf (377) and Martina Navratilova (332).

Williams also gave a shout-out to her fiance, Internet entrepreneur Alexis Ohanian, who turned 34 on Monday. In turn, he shared his own social media post that celebrated the fact that she “announced officially” her pregnancy earlier in the day.

Williams had apparently announced her pregnancy in an inadvertent way last week, posting an image to her Snapchat account that showed her with a bit of a belly and included the caption, “20 weeks.” She subsequently deleted the post, but the news had gotten out, and her caption indicated that she had been pregnant when she won the Australian Open.

Later on Monday, Williams posted a note to social media in which she excoriated Romanian Fed Cup captain and former tennis star Ilie Nastase for making “such racist comments toward myself and unborn child, and sexist comments against my peers.” Of William’s child, Nastase had reportedly said, “Let’s see what color it has. Chocolate with milk?”

“This or anything else will not stop me from pouring love, light and positivity into everything that I do,” Williams wrote. This will be the first child for both Williams and Ohanian, whose relationship dates back to at least October 2015, and who became engaged in December 2016.

Note: Previous versions of this post said that Ohanian turned 33 on Monday. He turned 34.