OMAHA, Neb. (AP) — Union Pacific is laying off 500 managers and 250 other workers to reduce costs and eliminate about 8 percent of the railroad's managers.

The railroad told the affected workers Wednesday that their jobs will be eliminated by mid-September.

Union Pacific CEO Lance Fritz said that eliminating open positions through attrition and improving productivity isn't enough to cut costs.

"Union Pacific for some time has leveraged employee attrition and technology to reduce general and administrative costs," Fritz said. "Unfortunately, attrition alone will not keep pace with our need and ability to reduce these costs."

Railroads have been under pressure to reduce costs because of weak growth in freight shipments overall and a sharp decline in coal shipments in recent years. Both of the major freight railroads in the eastern United States — CSX and Norfolk Southern — have announced more aggressive cost-cutting efforts in the past year.

CSX has announced 2,300 layoffs this year as part of a major restructuring under new CEO Hunter Harrison, who took over in March.

Norfolk Southern is working to reduce its expenses by $650 million and improve efficiency by 2020. The railroad expects to cut more than $100 million in costs this year after trimming $250 million last year.

Most of Union Pacific's layoffs will be at the railroad's headquarters in Omaha, Nebraska, but they will affect Union Pacific's 23-state network. In the second quarter, Union Pacific had about 42,000 employees.