Walgreens and FedEx are expanding their relationship to launch next-day prescription delivery nationwide.

The move comes in the wake of online retail giant Amazon’s acquisition of PillPack, an online pharmacy that offers home delivery. Amazon’s distribution network is expected to help PillPack grow dramatically in what could be a major challenge to brick-and-mortar pharmacy giants Walgreens Boots Alliance and CVS Health.

But Walgreens said its partnership with FedEx will make it the “fastest choice for next-day prescription delivery across the nation.” CVS Health has been rolling out home delivery as well, announcing same-day service in several cities this summer.

“Next-day prescription home delivery is another convenience driver, alongside our industry leading number of extended hours pharmacies and one of the most downloaded digital apps in the category, designed to put care in the hands of our patients,” Walgreens president of operations Richard Ashworth said. “This expansion of our alliance with FedEx illustrates our commitment to making filling prescriptions as fast and easy as possible.”

The relationship builds on a partnership Walgreens announced last year with FedEx to provide access to FedEx “drop off and pickup services” at more than 7,000 drugstores across the country. The success of that relationship convinced Walgreens and FedEx executives to expand services.

FedEx employees are already in Walgreens stores multiple times a day so executives say the next-day and same-day handling and delivery of prescriptions will be “efficient, fast and consistent across the country,” a Walgreens spokesman said. Patients will receive text notifications when prescriptions are ready. “Following a simple process on their mobile device, patients can now have their qualifying prescriptions delivered right to their home as early as the next day” for a $ 4.99 fee nationwide, Walgreens said.

“FedEx and Walgreens are empowering consumers to choose when and where they receive their orders,” FedEx vice president of retail marketing Randy Scarborough said. “Just as FedEx package pick-up and drop-off services at Walgreens locations provide customers with much-needed convenience, the ability to ship prescription medication directly from Walgreens to their homes offers valuable flexibility to best meet individual needs and schedules.”