Marillyn Hewson, the next chief executive officer of Lockheed Martin Corp. (LMT), has spent 29 years at the company working her way to the top of the mostly male world of defense contractors.

Lockheed said yesterday that Hewson, 58, will become its CEO in January. Christopher E. Kubasik, who was supposed to get the job, resigned after the company discovered he had a “lengthy, close and personal relationship” with a subordinate, the company said.

Hewson will become head of the world’s largest defense contractor as women are breaking into leadership of an industry that has drawn its executives primarily from the male ranks of aerospace technologists and engineers. Phebe Novakovic will become CEO of General Dynamics Corp. (GD) in January, and Linda Hudson already holds the post at BAE Systems Plc (BA/)’s U.S. subsidiary.

“Marillyn is an exceptional leader with impeccable credentials and deep knowledge of our business, customers, shareholders and employees,” Robert Stevens, Lockheed’s chairman and current CEO, said yesterday in a statement.

Hewson, who joined the company in 1983 as a senior industrial engineer, has held positions including executive vice president of global sustainment for Lockheed Martin Aeronautics and president of Lockheed Martin Logistics Services.

Stevens said he will remain through 2013 as executive chairman of the Bethesda, Maryland-based company, working with Hewson to “facilitate a smooth CEO transition.”

‘Temporary Distraction’

Hewson will lead a company with 123,000 employees and sales last year of $46.5 billion as it faces an era of defense spending cutbacks.

“During my 29 years at this company, we’ve experienced numerous changes in our leadership,” Hewson said on a conference call with reporters. “We’ve had a resilient workforce and a strong strategy, and we will move forward beyond this temporary distraction together.”

Hewson has handled tough transitions before. In 2009, as president of Lockheed Martin Systems Integration, she eliminated almost a quarter of her workforce of 4,000 in Owego, New York in response to the cancellation of the company’s contract to develop and build the next presidential helicopter program. Lockheed’s 2005 contract to build the next helicopter, known as the VH-71 and originally valued at about $6 billion, was canceled by the Navy after costs doubled to $13 billion. The increases were driven partly by changing specifications for the aircraft.

“It’s easy to be a leader when everything is going great,” Hewson said that year in a speech at Binghamton University in Binghamton, New York. “The challenge is how you act when things go wrong.”

Hewson, who was born in Junction City, Kansas, said she learned the need for leadership skills at an early age.

Family Moves

“My dad died when I was nine, leaving my mother with five young children,” she said in the Binghamton University speech. “My mom taught us self-reliance and to take responsibility for our own personal success. She encouraged us never to set limits for ourselves on what we thought we could achieve.”

The married mother of two sons said she has served in 18 different leadership positions. “I moved my very supportive family eight times for Lockheed Martin,” she said in May, when she accepted the Woman of the Year Award for a non-military leader from the USO, the service organization that supports the military.

“I was fortunate to have leaders who recognized my potential, the ability for me to do more and move me up the ranks of Lockheed Martin,” Hewson said.

She also gave advice to women who must balance the pressures of work and family obligations.

“I’m not sure we all know exactly what this word ‘balance’ means, but it often comes up for women because we do have many roles that we serve,” Hewson said. “From my view, balance is about making sure that your family or significant others are in communication with you on what your opportunities are and making choices.”