Elizabeth Holmes, founder and chief executive of Theranos. (David Paul Morris/Bloomberg)

In the latest episode of what has become one of the most gripping Silicon Valley sagas in recent memory, Walgreens officially announced Sunday night that it has terminated its partnership with troubled blood testing startup Theranos, effective immediately.

The large drugstore chain had already halted Theranos testing at its Palo Alto, Calif., location in January, and the new announcement means that Walgreens will now shutter its other 40 Theranos Wellness Centers, all in Arizona.

The move follows Theranos's unusual decision to void two years' worth of test results from its proprietary "Edison" machines, issuing tens of thousands of corrected reports — a move first reported by the Wall Street Journal last month. Regulators are also weighing whether to impose sanctions on the company, among them a potential two-year ban of its founder, Elizabeth Holmes, from running a laboratory.

“In light of the voiding of a number of test results, and as the Centers for Medicare and Medicaid Services has rejected Theranos’ plan of correction and considers sanctions, we have carefully considered our relationship with Theranos and believe it is in our customers’ best interests to terminate our partnership,” Brad Fluegel, Walgreens senior vice president, said in a statement.

Walgreens said it would work over the coming days to help Theranos customers transition.

Theranos spokeswoman Brooke Buchanan said that the company continues to expand despite the setback. Theranos has five independent locations where it offers testing in Arizona and California, with plans to expand through Arizona and Pennsylvania later this year.

“Quality and safety are our top priorities and we are working closely with government officials to ensure that we not only comply with all federal regulations but exceed them. We are disappointed that Walgreens has chosen to terminate our relationship and remain fully committed to our mission to provide patients access to affordable health information,” Buchanan wrote in an email.

Theranos was a media darling in its early stages, a highly secretive tech company seeking to disrupt the blood testing industry that had gained major financial backing. Its charismatic young founder, Holmes, had a fascinating backstory: a college dropout with an aversion to blood draws and an unusual cast of Washington heavyweights willing to sign on to her company's board. The Wall Street Journal began to unravel the tremendous hype around the company, revealing that Theranos was not using its proprietary technology for many of its tests and raising questions about the accuracy of the tests' results. Regulators have been scrutinizing the company and uncovered numerous deficiencies.

Theranos has pledged to battle on, but success may not be as simple as persuading regulators. In order to be successful, Theranos will have to win the business and trust of physicians and patients.

That may be easier said than done. Several lawsuits have been filed by patients against Theranos because of the voided results. The company has said those lawsuits are without merit.

Holmes this summer will present scientific information about Theranos's technologies at the American Association for Clinical Chemistry's conference — something she has been invited to do at least once in the past and declined, according to AACC President Patricia Jones. The announcement that Holmes would appear at the conference to explain how her technology works came April 18, the same day that the Wall Street Journal reported that the company was the subject of a criminal probe.

As far back as October, Holmes said her company would publish data showing how the technology works.

"I think I am learning, we are engineers and scientists and we have our views of how to create technology and how to invent things, and I think doing so in this medical space, we have to publish our data, and so we are," Holmes said at a medical innovation summit at the Cleveland Clinic.

Theranos has not yet published data providing insight into how the technology works. Instead, an outside team of researchers used Theranos's testing service and compared it to the two dominant blood testing laboratories in the United States and found it was far more likely to flag abnormal results than its competitors.

Read More:

Deficiencies at Theranos ‘pose immediate jeopardy to patient health’

What happened when I tried the new blood test that was promised to change the world

E-mails reveal concerns about Theranos’s FDA compliance date back years