Federal employees’ satisfaction with their agencies’ senior leaders hit a five-year low last year, according to a survey of the workforce released Friday that also shows continuing discontent overall.

Many employees still think the work they do is important, believe in their agencies’ missions and put in extra effort to get the job done, the 2014 Federal Employee Viewpoint Survey found.

But it also revealed a workforce that overall was more unhappy in 2013 after a year of turmoil that included furloughs and a disruptive government shutdown.

“While leaders across government would like to see these scores go up, we have to remember that this has been a very difficult time for federal employees,” Katherine Archuleta, director of the Office of Personnel Management, said at a briefing on the survey, which is administered by her agency.

“It’s going to take time for them to recover from an extended period of sequestration, furloughs and a government shutdown,” she said.

NASA came in first among large agencies, with 74 percent of employees reporting overall job satisfaction. Among small ones, the U.S. Trade and Development Agency and Surface Transportation Board tied for first, with 84 percent of those surveyed saying they are happy at work.

The National Archives and Records Administration came in last among large agencies with 49 percent satisfaction; the least-content employees at small agencies work at the Chemical Safety and Hazard Investigation Board and the Defense Nuclear Facilities Safety Board, each with just 38 percent giving positive responses.

Almost 400,000 civilian employees responded to the survey, which was conducted in April through June. Employees were asked to weigh in on almost every feature of their work lives, from how they see their immediate supervisors to how well their agency helps them balance work with family life.

That balance seems to be working. Almost three-quarters of employees said they were happy with child care and other services for parents provided by their agencies, and 77 percent are happy with their work-from-home arrangement. The number of employees who telework between one day a month and three or more days a week is now 29 percent.

But overall, less than two-thirds — 64 percent — of employees say they are happy with their jobs, down a point from 2012. Only 62 percent said they would recommend their organization as a good place to work, down from 70 percent four years ago.

Less than a third say they think promotions in their office are based on merit.

Across government, the percentage of positive responses to 32 of 77 questions fell last year over 2012. And the most significant slide was in employees’ views of their agency’s senior leaders.

Employees had high marks for their immediate supervisors.

But when it comes to trusting senior leaders to maintain “high standards of honesty and integrity,” only 49.5 percent agreed, down from 53.6 percent in 2012. Only 38 percent of employees agreed that their senior leaders inspire a high level of motivation and commitment to their jobs, down five points from 2012. Just half say senior leaders maintain high standards of honesty and integrity, down five points from 2012.

Carol Bonosaro, president of the Senior Executives Association, the professional group that represents the government’s 6,000 top career executives, said the survey offers “no good, solid definition” of whether a senior leader is a political appointee, civil servant, senior executive or Cabinet secretary. So it is hard to know which leaders should work on improving their leadership skills.

Results from some agencies dragged down averages across the government. The Department of Homeland Security , for example, has suffered from low morale and high turnover for years, particularly among senior executives.

Homeland Security Secretary Jeh Johnson gave a pep talk to his workers Wednesday after handing out distinguished-service awards to more than 300 of them. It was part of the department’s latest effort to tackle the problem, which Johnson has vowed to fix.

Colleen Kelley, president of the National Treasury Employees Union, said in a statement that the 2014 survey “should serve as a wake-up call for federal managers to find creative ways within existing constraints to improve morale and employee retention.”

A Defense Department spokesman said the 2014 results reflect challenges to agency resources after a year in which the budget cuts known as sequestration forced furloughs for tens of thousands of employees.

“DoD leadership is committed to addressing workforce concerns through action planning and ongoing process improvement,” spokesman Nathan Christensen said in a statement.

At the Veterans Affairs Department, which has been rocked by a backlog in processing of benefits claims and a waiting-list scandal, a spokeswoman said in a statement that the agency is “working hard to improve our service to veterans and create a much more open culture at VA where every employee feels comfortable telling the Secretary what’s wrong in the organization and how we can improve.”