Parts of Sydney were heading into a fresh lockdown on Saturday as officials in Australia's most populous city said they hoped the restrictions would be enough to control a growing outbreak in time for Christmas.

As a cluster of cases on the city's northern beaches grew to 38, residents were ordered to stay at home from late Saturday until midnight on Wednesday, other than for essential reasons.

"We're hoping that will give us sufficient time to get on top of the virus so that we can then ease up for Christmas and the New Year," said Gladys Berejiklian, the state premier of New South Wales of which Sydney is the capital.

From 5pm on Saturday, hundreds of thousands of people in several suburbs will be forced indoors with beaches, pubs and hotels closed.

Although the restrictions -- which will be enforced by police -- only apply to the northern beaches, Berejiklian pleaded with Sydney's more than five million residents to stay home as much as possible over the coming days.

"Can I please ask everybody to abandon non-essential activity," she told local media on Saturday. "We don't want the virus to spread outside of the northern beaches."

People line up for coronavirus testing in Sydney
People line up for coronavirus testing in Sydney AFP / Steven Saphore

The leader also flagged a possible return of some restrictions for the entire city, if the cluster continued to grow.

Australia's success in containing the virus has allowed a continued rollback of restrictions ahead of Christmas, with domestic travel having returned largely to normal before the latest outbreak.

The loosening of curbs has sparked fears that the new outbreak could have already spread around the country.

One case linked to the cluster has been detected in the neighbouring state of Queensland, prompting officials to announce restrictions on travellers from Sydney and forcing many into isolation.

Masks are still not mandatory in the city but residents in the northern beaches have been urged to wear them at all times while inside.

Australia has recorded over 28,000 Covid-19 cases and 908 deaths linked to the virus in a population of about 25 million.