Serena Williams was calm in a return more dramatic than some might have expected — even after a long layoff.

Williams needed to rally to win in her comeback following a six-month layoff, beating unseeded American Bernarda Pera 4-6, 6-4, 6-1 in Tuesday's first round of the Top Seed Open.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Williams advanced to a second-round showdown on Thursday against older sister Venus, who dispatched Victoria Azarenka 6-3, 6-2. The two will meet for the 31st time in a match that figures to be emotionally and physically challenging for both of them.

“From one Grand Slam (winner), one No. 1 to another," said Venus Williams, who's 12-18 against her sister. “It's been quite the draw for me but, honestly, it's perfect because I don't play forever so I want to play the best players. And I think I got my wish. Here we go.”

Serena first had to clear some athletic hurdles against Pera in the opening match at center court.

Looking to return to form following the break caused by the coronavirus pandemic, the 23-time Grand Slam champion labored to avoid her 14th loss to an opponent ranked outside the top 50. The ninth-ranked Williams quickly struggled after a promising start as Pera, ranked No. 60, broke her at love in the fifth game on the way to a first-set victory.

The tournament’s top seed positioned herself to even the match to break Pera for a 3-1 lead in the second set before Pera answered with a break in the next game. The Croatian-born Pera eventually evened the set and had Williams down 0-40 at 4-4 before the 38-year-old Williams rallied to stay on serve.

“I just knew I needed to be better,” Williams said. “I knew I could be better. And it was an interesting game. She had so many winners and (was) so low. I just had to kind of get used to a game a little bit. She played really well.”

Williams needed another rally to win the next game before getting a hard-earned break to force a third set. She bore down from there to break Pera at 3-1, then gutted out the next game at deuce and sealed the match with another break.

Williams took 2 hours, 16 minutes to make it to another day at an event where players hope to polish their hard-court skills for this month’s U.S. Open in New York. She was especially excited to get going after the long layoff and advanced by remaining composed under stress.

Williams hadn’t played since splitting two Fed Cup matches in February but used the down time to begin building a gym and training on a court built by her husband, Reddit co-founder Alexis Ohanian. Williams arrived looking cut and ready to begin preparation for the Open.

Pera wasn’t awed by Williams’ stellar resume or power in their first meeting. The left-hander broke Williams at love for a 3-2 edge on the way to taking the first set. Williams appeared to turn her left ankle slightly and she fell backward on one return, losing the point and the next game.

She had other stumbles but managed to regain her footing — and her serve.

Venus Williams had a much easier time against Azarenka on a star-studded Tuesday. The seven-time Slam champ led 4-0 in the second before splitting the final four games to earn her first victory in four tries this year.

Up-and-coming Coco Gauff, 16, moved on to the next round by beating Caroline Dolehide, 7-5, 7-5.

“I played pretty freely today and it didn't turn out too bad,” said Gauff, who acknowledged some pre-match nerves.

Seventh-seeded Sloane Stephens, the 2017 U.S. Open champ, lost to Canadian qualifier Leylah Fernandez, 6-3, 6-3.

In other matches, CiCi Bellis beat fellow American Francesca di Lorenzo, a last-minute replacement for fourth-seeded American Amanda Anisimova, 6-1, 6-2. Anisimova withdrew Tuesday morning with an injured right shoulder.

Fifth-seeded Yulia Putintseva of Kazakhstan cruised past Australian Ajla Tomljanovic, 6-0, 6-4. Switzerland's Jill Teichmann ousted Russian qualifier Anna Kalinskaya, 6-2, 7-5. And Anna Blinkova of Russia topped American Kristie Ahn 6-2, 4-6, 3-1 (retired).