By Micah Maidenberg and Sharon Terlep

Walgreens Boots Alliance Inc. said it plans to cut about 4,000 jobs in the U.K. and suspend stock buybacks as demand fell off in its international business during the drugstore chain's latest quarter.

The pharmacy chain on Thursday said the coronavirus pandemic sliced out around $700 million to $750 million in sales for its quarter that ended May 31, with most of the impact tied to its retail pharmacy business overseas.

A "dramatic reduction" in customer traffic, including an 85% decline in April, weighed on demand for its Boots U.K. stores, Walgreens said. The company said it recorded noncash impairment charges of $2 billion tied to the Boots U.K. unit.

The job cuts in the U.K. will impact about 7% of its workforce there, and will include shuttering 48 Boots opticians and a 20% headcount reductions in the company's U.K. support offices.

Foot traffic "ground to a virtual halt," in Walgreen's U.K.'s Boots business, which includes beauty-products retailers and eyecare centers as well as pharmacies, Walgreens Finance Chief James Kehoe said.

Overall, Walgreens swung to a loss of $1.71 billion, or $1.95 a share, for its latest quarter, compared with a year-earlier profit of $1.03 billion, or $1.13 a share. Its adjusted profit fell to 83 cents a share and was short of expectations.

The company generated $34.6 billion in sales, roughly flat year over year. Analysts polled by FactSet predicted $34.3 billion in sales for the latest period.

In the U.S. retail unit, sales rose about 3% from a year earlier to $27.4 billion for the latest quarter. Pharmacy sales were up 4.6%, while prescriptions filled in the third quarter decreased 1.3%.

The Covid-19 pandemic has been challenging for drugstores, as patients put off visiting doctors and other health providers. Walgreens is part of a coalition of health-focused companies that is paying for advertisements that encourage people to return to their medical providers.

"Globally, pharmacy volume was impacted by a drop in doctor visits and hospital patient admissions," the company said.

Walgreens is working with and investing in primary-care provider VillageMD to open 500 to 700 doctors' offices in its drugstores.

Rival CVS Health Corp. is developing so-called health-care hubs in its stores, offering a range of medical services. Walmart Inc. is also adding clinics to its locations.

Write to Micah Maidenberg at micah.maidenberg@wsj.com and Sharon Terlep at sharon.terlep@wsj.com