CHICAGO — Moving into the business of online retail, Walgreen Co. said Thursday morning it will buy Drugstore.com Inc. for more than $400 million.

CHICAGO — Moving into the business of online retail, Walgreen Co. said Thursday morning it will buy Drugstore.com Inc. for more than $400 million.

The deal comes just weeks after the Deerfield, Ill.-based drugstore giant said it would shed its pharmacy benefit management business for more than $500 million. That deal, Walgreens said, would help it better focus on its primary business of serving customers' daily health and living needs.

"Our acquisition of Drugstore.com today significantly accelerates our online strategy to leverage the best community store network in America by becoming the most convenient choice for health and daily living needs whether customers shop online or in our stores," said Walgreens Chief Executive Officer Greg Wasson in a statement announcing the deal.

The acquisition of the suburban Seattle-based online retailer will give Walgreens an additional $450 million in annual revenue and access to more than 3 million online customers, and add about 60,000 new products to its existing online offerings. Wasson also said it will enhance Walgreens' relationship with existing customers thanks to relationships the company will have with new vendors and other partners.