As the Costa Mesa Police Department continues its effort to refill its ranks, specialty assignments in the agency that had long been understaffed are getting a boost.

At the beginning of 2017, the department had 114 sworn officers, 22 short of its staffing target of 136. The agency currently has 126 sworn officers and nine recruits moving through the academy, according to spokeswoman Roxi Fyad.

As a result, the department’s traffic safety bureau and gang investigations and community policing units, which had thinned in past years, are getting more staffing.

“With the workforce that we continue to build on, it allows us to put individuals in units that provide specialized services in the community,” said Lt. Victor Bakkila. “It’s been really good for the organization and for the services that we provide.”

Vacancies in the Police Department have long been a nagging issue in Costa Mesa.

In 2011, City Council members voted to cut department staffing through attrition. Officials also delayed hiring for anticipated vacancies as some council members pushed to reduce pension benefits for new recruits.

At the end of 2012, the department brought in its first new sworn personnel since 2008.

In recent years, the department has been pushing to add staff. Chief Rob Sharpnack said in January that he expects the agency to be at full strength by summer.

With additional staff, the community policing unit, which was relaunched in late 2016 to provide support on crime and quality-of-life issues, has expanded with a third officer.

Community policing officers often can be found helping merchants secure their businesses to prevent crime. They also work with the city’s homeless population and target areas of town that have seen an increase in thefts to educate residents about crime prevention, said Lt. Joyce LaPointe.

“It allows them to look at the problems we have in different areas and go out and speak to those people and see how we can help them solve their problems,” LaPointe said. “It was happening before, but it was a little more difficult because you’re trying to get officers who have to handle other public safety issues to take time out of their day to meet with business owners.”

Officer Matt Richie spent two years working on patrol before making the transition to the community policing unit.

“The reality is, when you’re on patrol you’re trying to find a quick solution to issues and provide heavy enforcement,” Richie said. “In this particular unit we’re trying to find long-term solutions.”

The gang investigations unit recently got a new sergeant and two investigators. The unit, which helps look into gang crimes and works to reduce gang-related activity, now has four officers, two school resource officers and a sergeant.

The Police Department’s traffic safety bureau gained a second sergeant this year. It has seven traffic officers, a special-events officer and an investigator.

Additional personnel in that bureau means collision reports are completed faster and more officers are on the street to issue tickets and conduct proactive enforcement, said Sgt. Dan Miles, who joined the traffic bureau from patrol in January.

“Our mission is to maintain the safe flow of traffic throughout the city, and we do that by clearing traffic accidents in a timely manner and conducting enforcement,” Miles said. “Previously we were bouncing around from traffic accident to traffic accident trying to keep the traffic moving, and enforcement would be down.”

Now, more officers will be on the lookout for speeding and other traffic violations in an effort to prevent crashes, unit members said.

“With the staffing we are afforded, we have the opportunity to go out and tackle intersections that have a high collision rate or streets that we know have speeding issues,” said Capt. Mark Manley. “That’s where being proactive really benefits our community.”

hannah.fry@latimes.com

Twitter: @HannahFryTCN