It took nearly three decades for Marillyn A. Hewson to rise to the position of chief operating officer at Lockheed Martin — and a day to become chief executive.

Hewson said she didn’t see it coming Friday when the Bethesda-based defense contractor made her the company’s first female chief. Lockheed had been planning to hand over the reins on Jan. 1 to Christopher E. Kubasik, but he was asked to resign after the board discovered that he had had a personal relationship with a subordinate.

“I found out when I was invited into the boardroom,” said Hewson. “My reaction was immediately, ‘I’m ready.’ ”

With federal spending set to shrink, Hewson takes over at a challenging time for the contracting giant, but she’s no stranger to managing crises. She was running Lockheed’s business in Owego, N.Y., when that unit’s flagship program — a new presidential helicopter — was canceled in 2009.

The cancellation hit with no notice, Hewson said.

“We had a lot of challenges to overcome, but what was important was to also recognize that it wasn’t the end of the business,” she said. Businesses “have setbacks all the time. . . . It’s necessary that a leader assess the situation, take the appropriate action . . . and then reset and rebuild.”

Within the company, Hewson’s steady hand has earned her a reputation for being warm and personable.

“People seem to like Marillyn more than they like me,” Robert J. Stevens, Lockheed’s outgoing chief executive, joked with investors during a call Monday. “I don’t understand that, and I have to do a little more research there, but she is a genuinely likable person who understands people and connects with people in this company at an individual level.”

In recent years, the company has had a rocky relationship with the Pentagon, particularly over its expensive F-35 Joint Strike Fighter program, said defense industry consultant Loren Thompson, who counts Lockheed among his clients.

“Marillyn will be exactly what Lockheed Martin needed in terms of patching up its relationship with its Pentagon customer,” he said. “Marillyn manages to combine toughness and knowledge with graciousness and an ability to listen.”

Hewson was born in Junction City, Kan., in 1953 and earned her bachelor’s and master’s degrees from the University of Alabama. After graduate school, she spent several years as an economist for the Bureau of Labor Statistics.

She started with Lockheed Martin in 1983 as a senior industrial engineer working on military aircraft in Marietta, Ga. It was a new program that provided opportunity for Hewson to advance, and she soon took on supervisory duties.

She headed to Fort Worth in 1995 to become director of consolidated material systems and advanced sourcing. Over the years, her jobs have included running Lockheed’s systems integration business in Owego, handling corporate internal audits in Bethesda and managing global sustainment for Lockheed’s aeronautics business in Fort Worth.

In 2010, she took over the company’s electronic systems business, a 45,000-employee unit with work in 44 states as well as Canada, Australia and Britain. It also had the highest profit margin of any of Lockheed’s businesses.

Over the course of a 29-year career and 19 leadership positions, she moved her family — which includes her husband of 37 years, James, and two sons — eight times.

Stevens acknowledged Monday that his guidance on the company’s internal workings won’t be of much use to her.

“There’s very little I could offer Marillyn about understanding the operations of this company,” he said. “She’s overseen the Littoral Combat Ship, our missile defense programs, our precision-guided munitions.”

Now, Hewson will move from working on the company’s programs to being its public face. She’ll be responsible for meeting with Congress and with government customers at the Pentagon and in civilian agencies, and she will conduct calls with investors.

Hewson will also become one of several female executives leading defense contractors traditionally dominated by men. Phebe N. Novakovicis set to take over the reins of Falls Church-based General Dynamics next year, and Linda Hudson has led for several years the Arlington-based U.S. unit of BAE Systems.

Still, Hewson has played down the importance of this milestone.

“I certainly want to continue to be a role model,” she said in an interview earlier this year. “But I don’t think it’s necessarily about being a female in our business. I think it’s about . . . my track record, my results.”