The Minneapolis Police Department’s work forging deep ties among local Somali immigrants is gaining national recognition as officers help replicate their efforts in other cities.

For the past few years, officer Abdiwahab Ali and Sgt. Mohamed Abdullahi have helped Toronto authorities work with Somalis and assist troubled youths.

Only a few years ago, Ali says, the Canadian city had a serious problem after a series of unsolved killings of Somali youths and little cooperation from residents. Perhaps more alarmingly, several dozen Somali-Canadians had left to join extremist groups in the Middle East such as Islamic State in Iraq and the Levant, which has seized large parts of Iraq and Syria.

In 2012, Toronto police officials visited Minneapolis, which had been lauded as a model for other law enforcement agencies struggling to hire more East African officers and improve relations with immigrants. Several members of Toronto’s newly formed Somali Liaison Unit returned to the Twin Cities the following year, as part of an officer exchange program between the two police departments.

It is the latest sign that the police department’s work to turn its outreach effort into a national model is working.

Ali and Abdullahi said even basic police work must be delicate and nuanced to build credibility.

In Minneapolis, Deputy Police Chief Kris Arneson chatted with officer Mohamed Abdullahi and Sgt. Abdiwahab Ali about a bike program that has helped Somali-American youths.

“One example is if you don’t know the culture of a police officer knocking on the door,” Ali said in a recent interview.

A Somali woman is likely to say, “Give me a minute,” Ali said. That can be troubling for unfamiliar police officers, who might start kicking the door and saying, “What the heck, why isn’t she opening the door?”

“Which if you know the culture, a Somali female is going to go cover her hair because of the religious thing,” Ali said. “Knowing that little thing can make a big difference.”

Ali says that gaining the Somali immigrants’ trust has proved challenging because a legacy of police corruption in their war-torn homeland has tainted their perception of law enforcement.

Toronto law enforcement officials found the information invaluable after a recent visit by Ali and Abdullahi.

“I am confident that the knowledge and information gained through the day’s discussion will bolster efforts to strengthen the relationship between the police and the Somali-Canadian community,” said Toronto Police Services Board Chairman Alok Mukherjee.

Now, officials say, crime in Cedar-Riverside — home to a large percentage of Minneapolis’ Somali immigrants, as well as other ethnic groups, including Oromo, Amharic and Eritrean — has fallen steadily in recent years.

Minneapolis’ troubles once mirrored those in Toronto.

Several young Somali-Americans were being recruited to fight for terrorist groups in their violence-scarred homeland, while a few were charged with funding terrorist activity.

The area was once rife with gangs and drugs, police and Somali leaders say.

A soon-to-be-released Police Executive Research Forum report is expected to say that by forging such ties, Minneapolis police have created a national blueprint for fighting crime in immigrant neighborhoods.

Law enforcement officials recently launched a federally funded policing initiative aimed at strengthening ties with Somali-Americans. They are doing this by having police working with elders and young people, probation officers, prosecutors, business owners and law enforcement experts to improve relations and reduce crime.

Ali recently recounted how he had responded to a missing-person call involving a Somali youth.

The teenager’s mother said she was worried because her son had been running with a bad crowd, staying out late and getting into fights. The teen eventually returned home, but Ali could not shake the feeling that there was more to the case.

“The comments that he makes in front of the mom, for us, we realized that the kid seemed that he’s being brainwashed as far as a religious way,” Ali said. “The comments that he made that really gave us a red light was that he said … ‘I can disobey my mom, based on the religion,’ which was really false.”

The teen later entered a diversionary program that kept him out of jail.

Ali and Abdullahi are founding members of the Somali-American Police Association, a national organization that “provides a network for Somali-American law enforcement professionals and strives to recruit more police and law enforcement officers of Somali heritage to our various law enforcement communities.”

Five of its 11 local members are with the Minneapolis Police Department; the others hail from St. Paul (which recently hired its first female Somali-American liaison officer), Mankato, Columbia Heights, the Hennepin County Sheriff’s Office and Metro Transit police.

In St. Paul, police officials say they have worked relentlessly to build good relationships with Somali-Americans.

“Somali-American officers are the key to reduce Somali youth violence, which affects the peace of our Twin Cities,” said Hassan Mohamud, imam at the Minnesota Da’wah Institute in St. Paul, who is currently traveling in Somalia.

Jaylani Hussein, the new executive director of the Council on American-Islamic Relations, said police have made great strides in improving relations.

“I personally believe that they are breaking boundaries and being really a great resource for building the bridges between the Somali community and the police department,” Hussein said.