LONDON— Amazon.com Inc. has struck a deal with the U.K.’s fourth-largest grocery chain, Wm Morrison Supermarkets PLC, taking the Internet retailer a step closer to becoming a serious player in Britain’s ultracompetitive online grocery market.

In coming months, the grocer said “hundreds of Morrisons products” will be available to customers of Amazon’s one-hour Prime delivery and Pantry services. Amazon added that the deal includes products such as soup, chocolate, spaghetti and orange juice.

“The Amazon deal is a reminder that the world’s biggest online retailer is targeting grocery in the U.K.,” said Exane BNP Paribas analyst John Kershaw.

The Bradford, England-based grocer’s shares closed up 5.9% at 199 pence in London. Shares of rival Tesco PLC—Britain’s largest grocer by market share—closed down 2%.

Amazon’s moves to build its presence in the U.K. come as the country’s online-grocery market continues to boom, with penetration higher than in most other developed countries.