By Sharon Terlep and Micah Maidenberg

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 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.

Shares of the pharmacy chain fell more than 9% in early trading Thursday.

The job cuts in the U.K. will impact about 7% of its workforce there and less than 1% of its global staff, and will include closing 48 Boots opticians and a 20% head-count reduction in the company's U.K. support offices.

Boots, a big seller of upscale health and beauty products as well as a pharmacy and eye-care chain, has been a lucrative business for Walgreens, which has struggled in the U.S. amid smaller revenue for prescription drugs and competition from online retailers.

Walgreens acquired Boots Alliance in 2014, two years after taking a 45% stake in the company, which also is Europe's largest pharmaceutical wholesaler.

Boots comprises most of Walgreens' international retail and pharmacy business and is concentrated in the U.K., where it has nearly 2,500 retail outlets and 600 opticians. Walgreens has another 2,100 stores outside the U.S. in countries including Mexico, Chile and Thailand.

Overall, the international unit generated 8% of the company's revenue and 15% of its gross profit last fiscal year.

Foot traffic "ground to a virtual halt," in Walgreen's U.K.'s Boots business, Walgreens finance chief, James Kehoe, said Thursday in a call with investors.

Sales fell 70% for the company's 600 U.K. optician locations, which typically generate around $500 million in sales but were largely closed amid the pandemic.

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 had 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. Pharmacy sales were up 4.6%, while prescriptions filled in the third quarter decreased 1.3%.

Walgreens has been cutting costs in its home market and last year it announced plans to close 200 U.S. stores.

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 Sharon Terlep at sharon.terlep@wsj.com and Micah Maidenberg at micah.maidenberg@wsj.com