The Boston police and fire departments are the least racially diverse major city agencies and must be a focus in the push to make City Hall look more like the residents it serves, according to a report by Mayor Martin J. Walsh's administration.
The report analyzed the entire municipal payroll and found that while Walsh made good on his campaign pledge to hire a diverse Cabinet, the second tier of leadership at City Hall remains overwhelmingly white.
Few blacks, Hispanics, or Asians serve as department heads.
Overall, the city's workforce of nearly 17,000 full- and part-time employees is 58 percent white, according to the report, and does not reflect Boston's increasingly diverse population. African-Americans, Hispanics, and Asians constitute 53 percent of the city's population.
Concerns about diversity and the city's workforce extend to gender.
If the Boston Public Schools is taken out of the analysis, the report found that there are at least two men for every woman on the payroll.
Across all city agencies, women earn on average 14 percent less than their male coworkers.
Walsh's new Office of Diversity compiled the 28-page study, which is scheduled to be released Tuesday, by conducting a department-by-department analysis of pay and demographics.
"This report gives us a blueprint [that shows us] where we are and where we need to go," Walsh said Monday in an interview.
The analysis found that Latino and Asian employees are significantly underrepresented at City Hall, while the municipal payroll has a larger share of black employees than Boston has black residents.
Walsh vowed to build a diverse administration after winning the mayor's office with the help of voters from predominantly black, Latino, and Asian neighborhoods.
Demographics at City Hall have long lagged behind Boston, which is increasingly diverse.
"It's a major challenge, but that doesn't mean we don't work on that challenge," said Barbara Lewis, director of the Trotter Institute for the Study of Black History and Culture at the University of Massachusetts Boston. "We have to figure out how to make this happen for the benefit of all of us."
Other cities have also struggled with diversity at city hall, but some municipalities have made significant strides. San Francisco, for example, had a municipal workforce that was 65 percent people of color in 2013, according to a city report.
In Boston, Walsh created the Office of Diversity to help make the municipal payroll a better reflection of the city's population.
The report found that Walsh has a significant opportunity to shift the demographics at City Hall: Nearly 30 percent of full-time employees are 55 or older and may retire in the coming decade, creating thousands of openings.
"For me, it's about the opportunity in the next five years," said Shaun Blugh, the city's chief diversity officer.
The Walsh administration must work now to create a pipeline to fill those positions, Blugh said, by identifying existing employees for advancement and recruiting a diverse pool of new workers.
The city is upgrading software in its human resources department to allow Blugh to track demographic and hiring patterns in real time.
The software will also give employees more flexibility in identifying their race or ethnicity, giving the city a more robust set of diversity data.
Employees currently have only a handful of options.
The Walsh administration has taken other steps it says will increase diversity.
The challenge may be most difficult in the police and fire departments, which use civil service exams to help dictate hiring and extend preference to military veterans.
According to the report, the Fire Department is 72 percent white and 95 percent male. Boston's Police Department is 66 percent white and 72 percent male.
Both agencies will face a wave of retirements in the next several years, giving Walsh the opportunity to diversify the ranks.
The city's Veterans' Services agency will work to identify veterans of color to make sure they are taking exams for positions with the police and fire departments, Walsh said.
In the Police Department, the city is resurrecting the police cadet program, an apprenticeship that can give residents a path onto the force without serving in the military and could increase opportunities for people of color.
In the Fire Department, the city plans to hire a diversity recruiter.
Walsh said that to him, the most surprising finding in the report regarded the pay gap between men and women. While racial and ethnic demographics varied department to department, the pay gap between men and women was consistent across the city.
The mayor gave raises to two top female city officials recently and has vowed to take more steps to close the gap. Walsh announced last week that the city would analyze the wages of male and female employees at more than 60 local companies to highlight gender inequality.
The mayor also said he planned to use data gathered by Blugh's team to underscore his commitment to diversity.
By having hiring and demographic information readily available, he said he will be able to push his Cabinet officials and department heads to do more.
"We'll be able to call people out," Walsh said. "We'll be able to say, 'Why is that number so low?' "