NEW YORK — FedEx said Tuesday that it will be offering some employees up to two years’ pay to leave the company starting next year.

The voluntary program is part of an effort by the world’s second-biggest package-delivery company to cut annual costs by $1.7 billion within three years.

The restructuring is a response to a shift by customers away from premium package-delivery services and toward slower, less expensive modes as the global economy struggles to grow.

Employees who volunteer for the program will receive four weeks of pay for every year of service, capped at two full years of base pay.

Founder and CEO Fred Smith said in August that most of the cuts will come in the company’s Express and Services units, which have been hurt the most by the global economic conditions. A majority of those employees are in the U.S.

The Express unit is where FedEx got its start in 1971, and it is still the company’s biggest segment by far. The division moves 3.5 million packages on an average day, mostly by air.

Express has more than 146,000 employees worldwide — roughly two-thirds of those are located in the United States.

FedEx Services is FedEx’s behind-the-scenes logistics division, but it also includes FedEx Office, formerly Kinko’s. It is one of FedEx’s smallest units, with 13,000 employees, all based in the U.S.

FedEx, which is based in Memphis, Tenn., also plans to shed aircraft and underused assets to cut costs.

FedEx’s larger rival UPS has also said it’s reducing costs to make up for slow growth in the global economy.