Andy Murray took an early hold on the Italian as he won the opening two sets.
The Briton is unseeded, but thrives in the Australian Grand Slam where he has reached the final five times without winning. Berrettini, on the other hand, is ranked 14th, and reached the semi-finals in Melbourne last year.
In the end, it took five sets and almost five hours of play to decide the match. Berrettini battled back, rallied from a deficit in the fourth set and finally managed to win it in a gas-hugging tiebreak.
The final set also went to a tiebreak, with Murray eventually pulling the trigger and winning the match point via a net curler.
The match was played behind closed doors over center court due to the heat, with Murray getting plenty of help from the crowd’s support, although Berrettini’s was far from negligible.
Fifth-seeded Russian Andrei Rublev earlier knocked out Dominic Thiem from Austria in straight sets. American Taylor Fritz is also through after defeating Georgian Nikoloz Basilashvili 3–1 in sets.