(Reuters) - Instacart said on Thursday it will stop delivering groceries for Whole Foods next year, ending a partnership that has been under stress since Amazon.com Inc AMZN.O bought the upmarket grocer last year.

Slideshow ( 3 images )

Amazon's $13.7 billion purchase of Whole Foods in August 2017 has been a double-edged sword for Instacart, throwing the Whole Foods relationship into doubt while driving rival grocers such as Kroger KR.N, Aldi and Costco COST.O into Instacart's arms.

“Amazon’s intent from day one ... was to integrate Whole Foods with its own grocery-delivery efforts such as Amazon Fresh and Prime Now,” Tom Forte, an analyst with D.A. Davidson said.

Instacart Chief Executive Officer Apoorva Mehta said on Thursday that about 350 of its 1,415 part-time delivery employees at 76 Whole Foods locations would be laid off once the divorce begins in February 2019.

Whole Foods started testing in-house delivery at a Cincinnati store in February. Whole Foods “pickers” prepare the orders and hand them off to Amazon Flex drivers for delivery. Whole Foods did not give Cincinnati shoppers the option to have Instacart provide those services, as it did in other markets.

At the same time, Amazon pushed the pedal on delivery speeds - adding one- and two-hour grocery delivery options that compete with Instacart and other third-party providers.

Instacart bagged the Whole Foods delivery deal in 2014, elevating its brand with influential young consumers who want everything from groceries to sofas delivered to their doorsteps.

In 2016, the companies deepened their relationship, forging an exclusive, five-year agreement to deliver perishables.

It is still not clear what, if any, penalties Amazon incurred for ending the partnership early. Amazon did not immediately respond to requests for comment.

Edward Jones analyst Brian Yarbrough said Instacart will find it difficult to recover from the separation as the delivery space becomes more crowded and competitive.

Instacart, which has raised $1.9 billion since its founding in 2012, is diversifying its customer and revenue base as grocers like Kroger and Walmart Inc WMT.N expand in-house order "picking" and experiment with a variety of delivery services.

Instacart added about 100 retail partners this year and has built a service that uses shopper data to target consumers with coupons and promotions from packaged-goods brands such as Nestle NESN.S, General Mills GIS.N, Coca-Cola KO.N.