FedEx Corp. is snipping another tie with Amazon.com as the e-commerce giant emerges as a competitor by building its own shipping network.

The ground-delivery contract with Amazon won’t be renewed when it expires at the end of this month, FedEx said in a statement. The decision quickens the company’s retreat from the largest online retailer just two months after FedEx said its Express unit wouldn’t extend an agreement to fly Amazon’s packages in the U.S.

“This change is consistent with our strategy to focus on the broader e-commerce market,” FedEx said in the statement. Recent moves to bolster service “have us positioned extraordinarily well” to handle demand, it said. The courier will still have a contract with Amazon for international deliveries.

FedEx is reducing its dependence on Amazon as the online retailer builds out a logistics network with hundreds of fulfillment centers and adds next-day air capacity with leased jets. Amazon is also starting a home-delivery service modeled after the contractor-based ground unit at FedEx, which flagged the competitive risk in its latest annual report to U.S. regulators.

“We are constantly innovating to improve the carrier experience and sometimes that means reevaluating our carrier relationships,” Amazon said in an email Wednesday. “FedEx has been a great partner over the years and we appreciate all their work delivering packages to our customers.”

Amazon made up about 1.3 percent of FedEx’s sales last year. To scoop up more e-commerce business, FedEx announced in May that its ground unit would begin seven-day service in January, deliver more packages that had been handed off to the U.S. Postal Service and invest to handle oversized packages.

The Memphis, Tennessee-based company has also signed up more drop-off and pick-up points, including with Dollar General Corp. FedEx is even testing a ground-delivery robot.

By walking away from Amazon, FedEx is looking to increase its profit margins, even though the company could feel “some near-term pain,” Lee Klaskow, an analyst with Bloomberg Intelligence in a Wednesday note.

“This move is a logical progression after letting its Express contract expire in June,” Klaskow said. The Amazon contract “we believe was a low-margin business.”

United Parcel Service, the largest U.S. courier, is taking a different tack by continuing its relationship with Amazon. Analysts estimate that the retailer’s pledge to expand overnight deliveries fueled a 30-percent spike in UPS’s domestic next-day volume in the second quarter.

UPS hasn’t said how much revenue it generates from Amazon, but if the total were more than 10 percent, the courier would be obligated to disclose the information in regulatory filings. The amount is probably close to that threshold, according to analyst estimates.

Some of the ground packages that FedEx handled for Amazon will migrate to UPS, said David Ross, an analyst with Stifel Financial Corp.