Drugstore chain operator Walgreen Co said it will stop filling prescriptions for people covered by drug benefits manager Express Scripts Inc at the end of the year after failing to agree on a new contract.

At issue are terms under which Express Scripts would pay the largest U.S. drugstore chain for the prescriptions, which were expected to be worth $5.3 billion in sales to Walgreen in 2011. Shares of both companies fell on the news.

Walgreen also balked at Express Scripts wanting to be the one to define which drugs are considered branded drugs and which are considered generic.

Walgreen said it would no longer be part of the Express Scripts network as of January 1, 2012.

The breakup is part of long-running battle over costs in the lucrative market for prescription drugs, a market that is growing as the U.S. population ages. It is also reminiscent of a stare-down Walgreen had last year with another benefits manager.

A year ago, Walgreen and CVS Caremark Corp settled a tense dispute over reimbursements for drug prescriptions, saving a relationship worth billions of dollars for the two biggest U.S. drugstore chains. A week earlier, Walgreen had said it would end its arrangement to fill prescriptions for millions of CVS Caremark drug plan members.

We just can't accept rates that are less than the industry average and (do) not value what we bring to the marketplace, Walgreen CEO Greg Wasson said during a conference call with analysts on Tuesday.

Express Scripts said that it was trying to keep prescription drug costs affordable.

We would prefer that Walgreens participate in our network, but only if its costs are in line with other participating pharmacies, Express Scripts said in a statement.

Walgreen shares fell 6.3 percent to $42.33 in early trading, while Express Scripts fell 1.1 percent to $54.20.

Prescription sales make up nearly two-third of Walgreen's revenue, and customers of benefits plans, like Express Scripts, also shop for other goods while they are in a Walgreen's drugstore .

Also on Tuesday, Walgreen said profit rose 30 percent to $603 million, or 65 cents per share, in its fiscal third quarter, which ended on May 31, from $463 million, or 47 cents per share, a year earlier. That compares to the 63 cents analysts had forecast, according to Thomson Reuters I/B/E/S.

Gross profit margin rose 0.5 percentage point to 28.1 percent of sales, despite pressure from pharmacy reimbursements.

Prescriptions were up 4.1 percent at drugstores open at least a year. The company filled 210 million prescriptions, up 5.8 percent over last year's third quarter.

Walgreen again said it faced continued pressure as government agencies cut back on prescription drug payments.

Under the Medicaid program, U.S. states and the federal government pay for a large portion of medical care, including medications, for lower-income Americans. Lately, those agencies have been reducing how much they pay as they try to balance budgets.

During the quarter, the company sold its own pharmacy benefits management unit to focus on its retail business, with store remodeling and more food items.

As previously reported, sales at Walgreen's stores open at least a year grew 4.1 percent during the quarter. Same-store sales of general merchandise rose 3.9 percent.

Quarterly sales rose 6.8 percent to $18.37 billion.

(Additional reporting by Phil Wahba and Lewis Krauskopf in New York; writing by Brad Dorfman in Chicago; Editing by Derek Caney and John Wallace)