Updated

The Secret Service continues to struggle with low morale -- while NASA keeps its top ranking – according to a survey released Thursday on the 2016 “Best Places to Work” in the federal government.

Morale at the Secret Service, whose highest-profile mission is to protect the president, fell in 2016 for the fifth-straight year, putting it last among the smaller agencies surveyed by the Partnership for Public Service.

Across all agencies, federal employees are more satisfied with their jobs than they were last year.

But overall satisfaction is “lagging far behind” compared with the private sector. The nonprofit organization behind the study urged President-elect Donald Trump to make improving the federal workplace a “top priority.”

“Best-in-class, private-sector organizations understand that improved employee engagement leads to a better performance,” partnership chief executive and President Max Stier said. “People are our government’s greatest asset, and the new administration should commit itself to strengthening the federal workforce and improving the workplace culture.”

While the survey found an overall improvement in morale for two-straight years, the score was “well short” of its record high in 2010. The survey score four years ago was 65 out of 100 points, compared to 59.4 points this year.

By comparison, a similar survey of private-sector employees this year showed their score at 77 percent.

The Partnership survey attempted to explain “fluctuation” in federal employee morale over the two-term Obama administration by saying the first two years showed “marked, government-wide improvements.”

However, that was followed by a four-year “downward cycle” -- in part the result of across-the-board budget cuts, pay and hiring freezes, a partial government shutdown and employee furloughs.

Overall morale improved in the past two years because the administration directed agency leaders to improve workforce conditions as “political headwinds” subsided, according to the survey.

NASA was the top-rated large agency for the fifth-straight year. The top midsized agency for 2016 was the Federal Deposit Insurance Co. And the No. 1 small-sized agency was the National Endowment for the Arts.

At the Secret Service, though, job satisfaction has declined after a series of embarrassing episodes over roughly the past five years. Among them was a 2012 incident in which as many as 11 agents hired prostitutes on a trip to Cartagena, Colombia, ahead of President Obama’s arrival.

A series of incidents since then, including an intruder infamously entering the restricted area of the White House, has further tarnished the agency’s reputation and hurt morale. In 2014, agency Director Julia Pierson resigned after just a year-and-a-half on the job.

The Partnership survey was done with the firm Deloitte, with much of the data compiled by the Office of Personnel Management, through its Federal Employee Viewpoint Survey.

Roughly 408,000 employees in 379 federal agencies participated.

FoxNews.com’s Joseph Weber contributed to this report.