Defense contracting giant Lockheed Martin announced Thursday that it would eliminate 4,000 jobs and close several facilities in an effort to cut costs in a climate of reduced federal spending.

The Bethesda-based company said it would shutter its operations in Newtown, Pa.; Akron, Ohio; Goodyear, Ariz.; and Horizon City, Tex. At a fifth campus in Sunnyvale, Calif., Lockheed will close four buildings. The closures are set to take place by mid-2015 and will result in the loss of 2,000 positions.

An additional 2,000 jobs will be slashed from three Lockheed business areas: information systems and global solutions, mission systems and training, and space systems. The company said those cuts reflect “ongoing operational efficiency initiatives” and that they will be made by the end of next year.

“We may see some minor impact in the D.C. region as a result of today’s announcement, but we have no additional specifics to share at this time,” said Lockheed spokesman Gordon Johndroe.

Like many defense contractors, Lockheed has been grappling with declining sales to its main customer, the Pentagon. So far, the company has managed to increase profits despite the declining sales, but it has warned that the cuts would eventually take a toll.

“Lockheed is the nation’s largest military contractor, and it is like a leading indicator of what is happening to the entire defense market,” said Loren Thompson, a defense industry consultant who has worked with Lockheed and other contractors. “These closures and layoffs are emblematic of a trend in Pentagon demand that’s going to lead all of their competitors to make similar moves.”

Indeed, some contracting firms have already been trimming their ranks. McLean-based Booz Allen Hamilton, for example, announced staff cuts this year that came on the heels of a larger reduction in its management ranks in 2012.

This round of cuts at Lockheed is the latest move in a broader initiative to trim its workforce, shrink its real estate footprint and cut costs. Since 2008, the company has decreased its workforce to 116,000 employees from 146,000. It has also shed 1.5 million square feet of facility space. The facility closures announced Thursday mean the company is unloading an additional 2.5 million square feet of real estate.

“In the face of government budget cuts and an increasingly complex global security landscape, these actions are necessary for the future of our business and will position Lockheed Martin to better serve our customers,” chief executive Marillyn Hewson said in a statement.

The layoffs reflect that Lockheed is not reacting to the automatic spending cuts known as the sequester but preparing for long-term changes in government spending patterns, analysts said.

“This is not a result of sequestration, but an acknowledgment that budget will be going down from historical highs,” said Roman Schweizer, a defense policy analyst at Guggenheim Partners. “The real question is where and what level it will stabilize at.”

Still Schweizer said, if another round of sequestration cuts goes into effect next year, it could accelerate contractors’ push toward slimmer workforces and costs.