The agreement announced Thursday follows a series of disputes between Walgreen and Express Scripts that ended with the discontinuation of the contract between the drugstore operator and the pharmacy benefit manager last year.
The terms of the new agreement were not disclosed.
And Walgreen's biggest drugstore rival, CVS Caremark, said it thinks it will keep a lot of the former Walgreen customers that it has won over the past year.
The developments illustrate the dexterity that providers are going to have to play to compete effectively in a rapidly changing health care marketplace.
Shares of Walgreen Co. jumped $3.65, or 11.8 percent, to close at $34.62 Thursday while Express Scripts shares rose $1.07, or 1.9 percent, to $58.76.
Express Scripts administers prescription drug benefits for health plan sponsors and members, and it pays drugstores like Walgreen to fill prescriptions. Since January, Walgreen has not filled prescriptions for Express Scripts, saying the company was not paying enough in drug dispensing fees. Its sales have slumped since the split.
Express Scripts Holding Co. said it ended the contract with Walgreen because the drugstore operator wanted a premium compared to what Express Scripts paid other pharmacies. Walgreen Co. had said it would rather give up the revenue than continue filling unprofitable prescriptions. The dispute became public in June 2011. About a month later, Express Scripts agreed to buy one of its biggest competitors, Medco Health Solutions. That deal closed in April, and Walgreen could also have lost its business with Medco clients over the next few years as Express Scripts negotiated new deals.
The companies said in a statement Thursday that Walgreen will rejoin the network of pharmacies available to Express Scripts customers starting Sept. 15. Terms of the new contract were not disclosed.
"We are in the business of providing a broad range of pharmacy, health and wellness services to help meet the needs of all of our customers," said Greg Wasson, president and CEO of Walgreens, in a statement. "I am pleased that Walgreens and Express Scripts have been able to reach an agreement that works for both parties and is consistent with our company's principles.
Analysts said Walgreen probably made the biggest concessions in the deal because the split hurt its business more than it hurt Express Scripts.
"After speaking with Express Scripts, we don't believe that Express Scripts budged in negotiations as it has seen limited disruption since ending its relationship with Walgreen," said Citi Investment Research analyst Deborah Weinswing. She said the deal is likely to hurt Walgreen's profit margins. She added that it's not clear how many customers Walgreen will regain.
CVS Caremark said it expects to keep at least half the business it gained from Walgreen starting in late 2011 when the defections from Walgreen started ahead of its split with Express Scripts.
CVS also said it gained about 3 cents per share in income from the Walgreen-Express Scripts dispute in the first quarter and expects another 3 to 4 cents per share in the second quarter. The company said Friday it expects a smaller gain of 5 cents per share spread over the last two quarters of 2012.
Looking for ways to gain new business, Walgreen said in June that it had agreed to pay $6.7 billion to buy a stake in European health and beauty retailer Alliance Boots. In early July it agreed to buy Stephen L. LaFrance Holdings, which runs 144 drugstores focused in the mid-South, for $438 million.
Before the companies' contract lapsed, Express Scripts filed a lawsuit against Walgreen, accusing the drugstore chain of trying to lure away its customers. The lawsuit alleged that Walgreen told Express Scripts plan members, and especially Medicare Part D beneficiaries, that they would not be able to fill their prescriptions at Walgreen pharmacies unless they left Express Scripts and switched to a new pharmacy benefits management plan.
AP Health Writer Matt Perrone contributed to this story from Washington, D.C.