Amazon.com is almost certain to enter the business of selling prescription drugs by 2019, said two analysts at Leerink Partners, posing a direct threat to the U.S.'s biggest brick-and-mortar drugstore chains.

"It's a matter of when, not if," Leerink Partners analyst David Larsen said in a report to clients late Thursday. "We expect an announcement within the next 1-2 years."

Amazon has a longstanding interest in prescription drugs, an industry with multiple middlemen, long supply chains and opaque pricing. In the 1990s, it invested in startup Drugstore.com and Amazon Chief Executive Officer Jeff Bezos sat on the board. Walgreens eventually purchased the site and shuttered it last year to focus on its own branded website Walgreens.com.

Leerink's calls with industry experts suggest that Amazon "is in active discussions" with mid-size pharmacy benefit managers and possibly larger player such as Prime Therapeutics, Larsen's colleague, Ana Gupte, wrote in a separate report Friday.

Representatives for Amazon didn't respond to a request for comment. On Friday, CNBC reported that Amazon could make a decision about selling prescription drugs online before Thanksgiving. The news network didn't name its sources.

If the online retail giant does enter the pharmacy market, it would pose "an immediate near-term threat" to retail pharmacy chains such as CVS Health and Walgreens Boots Alliance, Gupte said.

CVS declined to comment, and referred to remarks made by its chief executive officer, Larry Merlo, on an earnings conference called on Aug. 8. The pharmacy business has "many barriers to entry," Merlo said at the time. Walgreens didn't respond to a request for comment.

Amazon could quickly grow in prescription drug sales and distribution, especially if it bought a mid-sized drug benefit manager and used it to create a more transparent pricing model, said Linda Cahn, a consultant at Pharmacy Benefit Consultants in Morristown, N.J.

Pharmacy benefit managers, or PBMs, administer drug benefits for employers and health plans, processing the prescriptions pharmacies dispense. Currently, final prices for many drugs are negotiated in secret deals between drugmakers and PBMs.

"Amazon could bring transparency into a marketplace that is entirely lacking," said Cahn. "They are disruptive instantly if they do it differently." Cahn is a critic of PBMs' business models.

The three biggest drug benefit managers — CVS, Express Scripts Holding Co. and OptumRx, a unit of insurer UnitedHealth Group Inc. — process about 70 percent of the nation's prescriptions, according to Pembroke Consulting.

A representative for Express Scripts didn't respond to a request for comment Friday. In an earnings call this summer, Express Scripts CEO Timothy Wentworth said he would be interested in partnering with Amazon, should it decide to enter the pharmacy space.

One possible partner for Amazon is MedImpact Healthcare Systems Inc., a privately held PBM based in San Diego, Larsen said in his report. MedImpact didn't respond to a request for comment. Prime Therapeutics, which manages drug benefits for nonprofit Blue Cross and Blue Shield plans in a number of states, is another.

"We are unable to confirm any conversations that may or may not have occurred," said Karen Lyons, a spokeswoman for Prime Therapeutics.

Last November, Amazon began a partnership with Seattle-based pharmacy Bartell Drugs to deliver over-the-counter drugs from its stores to shoppers through Amazon's delivery service Prime Now.

The partnership helped Bartell create an online presence to rival Walgreens. It also gave Amazon access to convenience items close to customers through Bartell's store locations.

The deliveries are now offered at dozens of location and include beer and wine, said Ric Brewer, Bartell's communications manager. Selling prescription drugs online wasn't a part of initial discussions regarding the partnership "due to the complexity of it," Brewer said.

Rumblings about Amazon's entry into the drug market have been brewing for months. In May, CNBC reported that Amazon.com had hired an official from Premera Blue Cross and was considering getting into online pharmacy.

Robert Langreth and Spencer Soper, Bloomberg