MELBOURNE, Australia — For the first five games in the second set, Serena Williams played almost flawless tennis in her first-round match at the Australian Open.
Then came the rustiness that tends to follow a lengthy layoff, giving Belinda Bencic a glimmer of hope, before Williams regained her composure to win 6-4, 6-3 on Tuesday. The six-time Australian Open champion improved her impressive record in the first round of Grand Slam tournaments to 65-1.
The No. 2-ranked Williams’ priority here is an Open era record 23rd major title. She’s one win down — beating a player who was seeded 12th here last year and reached a career-high No. 7 ranking last February — and is targeting six more at Melbourne Park.
‘‘She was just recently in the top 10. I knew it would be one of the toughest first-round matches I’ve ever played,’’ the newly engaged Williams said.
In round two she’ll meet Lucie Safarova, who beat Yanina Wickmayer, 3-6, 7-6 (9-7), 6-1.
Bencic got one service break in the first set, but only took two points in the first three games on Williams’ serve in the second.
Serving for the match at 6-4, 5-1, things changed. Williams finished her 2016 after the US Open, resting injuries. And started 2017 with an error-prone loss in Auckland, New Zealand.
Williams served only her second double-fault of the match to give Bencic a break-point chance, and Bencic converted it with a crosscourt winning forehand.
The Swiss teenager held at love and then faced a match point, when Williams double-faulted again.
The 35-year-old Williams made no mistake on her second match point and pumped her first in celebration. She finished with 30 winners and 30 unforced errors, eight errors, and four double-faults.
Karolina Pliskova and Johanna Konta both had their Grand Slam breakthroughs last year, both prepared for the season’s first major with title runs in Australia, and both advanced with straight sets wins.
US Open finalist Pliskova followed her title win at the Brisbane International with a 6-2, 6-0 victory over Sara Sorribes Tormo.
The fifth-seeded Pliskova, who beat Serena Williams in the US Open semifinals before losing the final to Angelique Kerber, has never advanced past the third round at Melbourne Park — losing at that stage in the last two years to Ekaterina Makarova.
Pliskova is feeling more confident this time.
‘‘I feel good on the court, especially when I win my first title in the first week of the year,’’ Pliskova said. ‘‘So I’m ready for the tournament.’’
Konta, who won the Sydney International title last week, had a tougher time in beating Kirsten Flipkens, 7-5, 6-2, on Margaret Court Arena.
‘‘I definitely love playing here. It’s a dream. A lot has happened in the last year, but I’m just enjoying playing and getting better each day.’’
Ninth-seeded Konta was a surprise semifinalist in her debut at the Australian Open last year, starting with a first-round win over Venus Williams and sparking a strong 2016 season which ended with her in the top 10.
In other early results, No. 21 Caroline Garcia beat Kateryna Bondarenko, 7-6 (7-4), 6-4, and No. 30 Makarova had a 6-0, 4-6, 6-1 win over Ekaterina Alexandrova.
On the men’s side, Milos Raonic and Dustin Brown renewed their Grand Slam duel on Tuesday and the result was the same as the last time — a three-set win for the tall Canadian.
Raonic and Brown met for the first time in the first round of last year’s US Open, where Raonic won in straight sets.
On Tuesday, Raonic defeated Brown, 6-3, 6-4, 6-2.
Last year, as the 13th-seeded player, Raonic had his best performance at Melbourne Park, advancing to the semifinals before losing to Andy Murray.
The 26-year-old Raonic is playing in his seventh Australian Open and in his 24th major. His best result so far has been a run to the Wimbledon final last year.
No. 25 Gilles Simon beat US wild-card entry Michael Mmoh, 6-1, 6-3, 6-3.
Unsettled by how nervous he felt after six months on the sidelines recovering from a knee injury, Roger Federer overcame his issues to score a four-set victory Monday in the first round over Jurgen Melzer.
No other man on tour knows the way around a Grand Slam tournament better than Federer, who is playing in his 69th major and has won a record 17.
He served 19 aces and had only one double-fault in a 7-5, 3-6, 6-2, 6-2 win over fellow 35-year-old Melzer, but dropped serve three times and experienced frustrating moments.
“I was feeling nervous once the match actually started,’’ said Federer, who hadn’t played at tour level since Wimbledon after taking time off to let his injured left knee heal. ‘‘In the warmup . . . I felt fine. Then I hit four frames in a row. It was like, ‘Whew, it’s not as easy as I thought it was going to be.’
‘‘I struggled for a while to find that groove, that rhythm.’’
Federer had surgery on the knee after a semifinal exit at the last Australian Open and missed the French Open, ending his streak of 65 consecutive Grand Slam tournaments.
He returned for Wimbledon, reached the semifinals, then didn’t play again in 2016. In November, he fell out of the top 10 for the first time in 734 weeks.
The 17th-seeded Federer wasn’t the only highly-ranked player to find the going tough Monday.
Stan Wawrinka, the US Open champion, was pushed to five sets. So was No. 5 seed Kei Nishikori. Defending champion Angelique Kerber, ranked No. 1 at a major for the first time, had some nervous moments in her 6-2, 5-7, 6-2 win over Lesia Tsurenko.
Kerber won her first Grand Slam title in Melbourne last year, beating Serena Williams in the final after saving a match point in the first round.
After wasting a match point before her serve was broken as Tsurenko rallied to win the second set, Kerber said her mind raced back 12 months.
‘‘When I lost the second set, and I had match point, I was thinking about my match last year in the first round,’’ she said. ‘‘First rounds are always tough.’’