(Reuters) - Eli Lilly and Co LLY.N said on Thursday it would lay off about 8 percent of its employees as the drugmaker, which has suffered setbacks over the past year in the development of two potential blockbuster drugs, works to cut costs.

A researcher in a file photo. REUTERS/Files

Lilly will cut about 3,500 positions around the world, resulting in yearly savings of about $500 million, beginning in 2018. The company’s shares rose 1.8 percent.

The company expects most of the cuts to come from a voluntary early-retirement program it is offering in the United States. It is also closing a plant in Iowa and research and development offices in New Jersey and China.

Lilly’s operating margins have lagged behind those of the company’s rivals, according to Morningstar analyst Damien Conover.

“Lilly’s R&D as a percentage of sales has trended a bit high over the last couple of years,” Conover said. “Part of this is to try to get its operating margins more in alignment with the overall group.”

Lilly expects charges of about $1.2 billion before tax, or $0.80 per share after tax.

Lilly outlined in July a likely multi-year delay for its experimental rheumatoid arthritis drug baricitinib, after the U.S. Food and Drug Administration declined to approve the drug, calling for an additional clinical study.

That delay followed the failure of a trial in November of Lilly’s experimental Alzheimer’s treatment solanezumab, which the company had hoped would be the first medicine approved to slow progression of the disease.

The company said it has the potential to launch two new medicines by the end of 2018 - a breast cancer drug and a treatment for migraines. The FDA is currently reviewing abemaciclib to treat advanced breast cancer.

Lilly shares rose $1.46 to $81.97 in afternoon trading.