SYDNEY—Parts of Australia’s largest city will go into a rare lockdown for at least a week as officials seek to stamp out an outbreak of the highly infectious Delta variant of the coronavirus.

People who live or work in four areas in and near downtown Sydney and the iconic Bondi Beach have been ordered to stay home from Friday night to stem the spread of the virus first detected in the city last week.

The last lockdown in Sydney, in December, was confined to the 70,000 residents of Sydney’s Northern Beaches area and lasted three weeks.

Australia has been relatively successful at containing the virus throughout the pandemic by keeping its borders largely shut and requiring travelers to quarantine. The country has recorded about 30,000 coronavirus cases, mostly among quarantined travelers from overseas, compared with more than 33 million cases in the U.S. Roughly 4% of Australia’s 26 million people have been fully vaccinated.

The size of the recent outbreak is small by global standards. On Friday, officials said the outbreak included 65 cases, with 22 new locally acquired cases having been recorded on the day prior.

The decision to put part of Sydney into lockdown reflects rising concern among officials over the highly transmissible Delta variant, which was first detected in India last year. Authorities have traced Australia’s recent outbreak to a Sydney limousine driver who transported international flight crew. Dr. Kerry Chant, the chief health officer of New South Wales state, which is home to Sydney, said genomic sequencing showed the driver was infected with the Delta variant.

The Delta variant has spread to dozens of countries, including the U.S., where it is expected to become the dominant version of the virus. The variant has driven a recent surge in cases in the U.K. and delayed the country’s planned economic reopening.

U.K. Prime Minister Boris Johnson announced a four-week extension to the country's Covid-19 restrictions Monday as the country deals with an increase in Delta variant infections. WSJ’s Jason Douglas explains what that could mean for the global effort to contain the virus. Photo: Henry Nicholls/Reuters The Wall Street Journal Interactive Edition

“Since the pandemic has started, this is perhaps the scariest period that New South Wales is going through,” New South Wales Premier Gladys Berejiklian said on Thursday.

Despite the relatively low case numbers, some health experts said the state may have moved too slowly to impose a lockdown. “The reality is the Delta strain is different and we should have gone faster,” said Dr. Omar Khorshid, president of the Australian Medical Association.

Dr. Chant said she hoped the partial Sydney lockdown would be a circuit breaker, but she said she expects a large number of new cases to be reported in the coming days. Officials expect anyone living with infected people in their home will likely catch the virus.

Write to Rhiannon Hoyle at rhiannon.hoyle@wsj.com