Walgreens Boots Alliance announced plans on Thursday to its cut annual costs by $1 billion within three years and reported first-quarter results that beat Wall Street's estimates.

The results also showed sales are struggling in Britain, one of its largest markets, and the stock dropped 3 percent Thursday morning.

Walgreens shares are down more than 2 percent this year bringing its market value to $69.3 billion. The stock has been under pressure as investors worry about the impact Amazon will have as it expands into the pharmacy business. To prepare for increased competition, Walgreens has announced partnerships with Kroger, Alphabet's Verily and others.

Investors should expect that transforming the traditional drug store business model will take years, CEO Stefano Pessina said.

"Whether it be three or five [years], it is difficult to say because of these [initiatives] take a lot of time to come to real fruition," Pessina said on a conference call with analysts.

Here's what the company reported compared with what Wall Street was expecting, based on a survey of analysts by Refinitiv:

Earnings per share: $1.46, adjusted, vs. $1.43 expected

Revenue: $33.79 billion vs. $33.78 billion expected

Walgreens Boots Alliance also announced a plan to reduce annual costs by more than $1 billion by the end of its third year. Targets will include global spending, organization and digitalization of the business. The initial focus will be on the U.S. and U.K., the company's largest markets.

The company did not disclose the expected cost of these efforts, but said it had already invested $30 million during its fiscal first quarter.

One-time costs for some improvements to its pharmaceutical wholesale division are expected to be between $150 million and $170 million. This part of the program is expected to save the company between $65 million and $75 million per year.

Revenue during the quarter ended Nov. 30 rose 9.9 percent to $33.79 billion, from $30.7 billion last year. The company's Rite Aid division accounts for some of that sales growth.

However, the company struggled in the U.K. International retail pharmacy sales decreased by 5.9 percent from a year earlier. It blamed a weak retail environment in the U.K. for the decline, despite improving Boots' market share in the country. Pharmacy sales at Boots open at least a year saw sales drop by 3.5 percent during the quarter from a year earlier, while same-store sales for all other retail fell by 2.6 percent.

The company also said that payment changes from the National Health Service and the sale of Boots Contract Manufacturing affected those sales numbers.

The company expects that its cost management program will help its U.K. business. Additionally, it is planning to roll out new beauty brands and products in its Boots stores.

The parent company reported fiscal first-quarter net income of $1.1 billion, or $1.18 per share, up 37 percent from $821 million, or 81 cents a share during the same quarter last year.

Analysts expected the company to generate $33.78 billion in revenue and adjusted earnings of $1.43 a share. On an adjusted basis, the company earned $1.46 a share.

Walgreens also reaffirmed its forecast of growing earnings per share by 7 to 12 percent during the 2019 fiscal year.

CORRECTION: One-time costs for improvements to Walgreens' pharmaceutical wholesale division are expected to be between $150 million and $170 million.