Walmart had made a big push into health care in recent years, opening clinics next to its superstores that offered primary and urgent care, labs, X-rays, behavioral health and dental work — Arkansas, Florida, Georgia, Illinois, Missouri and Texas. Walmart believed it could use its massive financial scale and store base to offer convenient, low-cost services to patients in rural and underserved areas that lacked primary care options.

But the announcement is an abrupt reversal in Walmart’s strategy and may leave a gap in health care access, particularly for lower-income patients without insurance who relied on the centers. Walmart also said it will end virtual health care services. 99 Cents Only Stores, founded in 1982, announced Thursday that they will close all 371 of its stores. Nearby stores include Visalia (pictured), Tulare, Hanford, and Porterville.

Related article Dollar stores are shutting down across America. They did this to themselves

“One of unique things was they were focused on stores located in underserved communities. It’s disappointing that Walmart wasn’t able to make it work because these patients need care and don’t have as many options,” said Ateev Mehrotra, a professor of health care policy and medicine at Harvard Medical School who researches retail health clinics.

Walmart said it was a “difficult decision,” but its health care push was not profitable for the company because of the “challenging reimbursement environment and escalating operating costs.”

“We determined there is not a sustainable business model for us to continue,” the company said.