Walgreens Boots Alliance ($WBA) had doubts about Theranos' proprietary blood testing technology when it partnered with the company a few years ago. But Walgreens forged ahead with a deal anyway and that decision has come back to bite it--big time.

The drugstore giant agreed to put Theranos blood-testing centers in thousands of its drugstores across the U.S. without ever fully validating the startup's technology or its capabilities, The Wall Street Journal reports. Walgreens repeatedly asked Theranos for more information but then backpedaled, partly because execs were worried that Theranos would choose a different chain as a partner.

Walgreens also considered calling it quits on the deal but held back because it was worried that Theranos might sue for breach of contract and claim billions of dollars in damages. Walgreens has lost $50 million by investing in the blood-testing outfit and it doesn't expect to get that money back, according to the WSJ story.

In 2012--a year before Walgreens and Theranos announced their partnership--two Walgreens execs and Paul Rust, a retired executive from Quest Diagnostics ($DGX), visited Theranos. "It was a very strange situation," Rust told the newspaper about the one-day rendezvous.

Rust "was never allowed to go into the lab" and had "no idea that the results I saw were run on the Edison devices or not." He was "led to believe that they were being run on the Edison," Rust said.

And "much to my surprise, the Walgreens people themselves had not been in the lab," Rust said. It turned out that Theranos was using its Edison machines for just a small fraction of its tests and used traditional lab equipment instead, former Theranos employees have said.

Walgreens prior to its deal with Theranos also said that it would pay Johns Hopkins to evaluate the company's technology. Theranos CEO Elizabeth Holmes and former president Sunny Balwani agreed to send one of the company's proprietary devices to the Hopkins lab. But Theranos never delivered the device, which left Walgreens unable to compare results from Theranos' machine with commercially available tests, according to the WSJ story,

Now, Walgreens is trying to sweep up the broken pieces. In October, the Deerfield, IL-based company froze its partnership with Theranos. Earlier this year, the company closed one blood-testing center in California after a federal inspection of Theranos' Newark, CA-based lab found that Edison devices often did not satisfy the company's own accuracy requirements.

When it didn't look like Theranos was moving fast enough to correct the issues, Walgreens issued the company an ultimatum. The company also asked its lawyers to see if there was a way to force Theranos to close the 40 blood-testing clinics that it set up at Walgreens' Arizona drugstores, The Financial Times reported earlier this year.

Walgreens declined to comment to the WSJ about its decision to partner with Theranos. Theranos is staying characteristically enigmatic about the companies' deal. "We value our partnership with Walgreens and look forward to continuing to work together," Theranos spokeswoman Brooke Buchanan told the newspaper.