Rabbi Shmuel Notik was on his way to blow the shofar on a Friday evening in the Kenyan capital of Nairobi when six men armed with knives intercepted him on a dark street.

Notik — a follower of the Chabad-Lubavitch stream of Judaism who had moved to Kenya to serve local Jews just days prior to that incident in 2014 — gave the assailants his prayer book and a lapel pin, along with his shofar, the ceremonial horn that Jews blow on Rosh Hashanah, the Jewish New Year. This was all he had on him because observant Jews are generally not allowed to carry objects on Shabbat.

It was a jarring experience for Notik, a 28-year-old father of two from Israel. But in hindsight, he says it was an inexpensive first lesson in the challenges facing Jews in Africa — including five Chabad couples who moved there recently as emissaries in the movement’s effort to cater to a growing community of Israelis and other Jews working in Africa’s fast-developing economies.

Despite rampant crime and other problems, Kenya is set to receive a second rabbi on Rosh Hashanah: Chabad emissary Avromy Super plans to transform the city’s century-old synagogue into a community center. His arrival with his newborn son and wife is the latest development in an effort that has included the opening of six Chabad houses since 2011 in Kenya, Ethiopia, Ghana, Nigeria and Angola.

Notik wasn’t sent by the Chabad movement — he arrived in Africa on his own two years ago to serve Israelis living there — but his community in Nairobi over the past decade has grown from having just a few dozen members into a congregation comprising hundreds, with its own Jewish kindergarten and preschool, Hebrew classes, a mikvah and two locations that serve as synagogues and community centers.

As in many other African countries, the community’s core comprises agriculture and technology experts living in Nairobi with their families, though Jewish businessmen who frequently travel here from Israel and beyond are also an important contingent.

“Sub-Saharan Africa is a difficult place but also exhilarating, dynamic and spiritual — a combo that attracts Israelis especially,” Notik said.

The growing presence of Western Jews in Kenya — to Africa, in general — is an example of how “the continent is developing at a breakneck pace that’s attracting communications, agriculture and construction professionals from all over the world, and from Israel disproportionately,” Notik said.

The growth isn’t always apparent in a metropolis that the New York-based Mercer consulting agency, which compiles quality-of-life ratings globally, recently ranked as the world’s seventh least-safe city for expats — locals jokingly call it “Nairobbery.” Street crime confines some observant Jews to their homes on Shabbat, when driving is prohibited to them and walking is too risky. Sometimes the curfews are without electricity due to shortages that also affect medical services. Fast mobile wireless internet is spotty and network crashes are frequent.

In Ghana, Chabad emissary Rabbi Noach Majesky, who moved to Accra last year, relies on a generator because “for every 36 hours of electricity, we have 12 without,” he said. Observant Jews across Africa have no reliable supply of fresh kosher meat. Many families wash babies in pre-boiled water for fear of pollutants and malaria is always a concern, especially for families with children.

These hardships mean that Chabad emissaries to Africa need to be hardy, motivated and not overly worried about the paucity of Western-standard medicine, according to Rabbi Shlomo Bentolila, Chabad’s head of operations there. Bentolila has been living in the Democratic Republic of Congo since the early 1990s, when he settled in the capital Kinshasa to cater to expat Jews primarily from France, Belgium and Israel.

But Bentolila’s deputies can’t be too aggressive either, he said, or they will alienate local Africans whose goodwill and cooperation they need.

“The interpersonal aspect is very important to get by in Africa,” he said. “You have to be outgoing, a people person. Rudeness and a sour face will get you nowhere.”

Coming from an informal society where last-minute improvisation and chummy pushiness is norm, Israelis have a reputation of faring well in Africa, where they maintain an surprisingly outsized presence considering their home country has a population of just 8.5 million. Bentolila said the arrival of thousands of Israelis since the 1990s has given Chabad operations a major boost. As such, he requires all his emissaries to speak fluent Hebrew.

But Majesky is also working on engaging local Africans. In August, he spoke to 400 university students in Accra about key elements of Judaism — a religion many in the Christian nation feel an affinity to.

“It’s actually a pretty spiritual place,” he said of Ghana.

Both Majesky and his Kenyan colleague, Notik, organize charity operations to help “bridge the enormous gap in African societies between poor and well-to-do,” as defined by Notik, who also holds evening classes for Kenyans on Jewish-Christian commonalities.

While the impact of Chabad rabbis on African societies remains limited, Majesky’s arrival last year in Ghana “has made a huge difference” for Gali Zimmer, a 37-year-old Israeli mother of three who lives in Accra with her husband, she said.

Zimmer, who keeps kosher, used to haul at least 90 pounds of kosher meat back to Ghana with her each time she visited Israel. But Majesky, who is a certified shochet, or ritual slaughterer, has made the inconvenience unnecessary by providing the community with a reliable supply of kosher chicken.

“With Rabbi Noach, we have proper holiday dinners that comply with halachah,” she said of Orthodox Jewish religious laws. “That’s something that has become especially important to me since we moved away from the rest of the Jewish world.”

Back in Kenya, Notik also slaughters chickens. Meanwhile, his colleague Super recently ordered a large shipment of kosher meat from South Africa.

The strengthening of ties between Israel and Africa was given a further boost this year when dozens of businessmen from Israel joined Prime Minister Benjamin Netanyahu on a four-nation tour — the first visit in decades to the continent by an Israeli head of state. Bentolila said the development is also helping Chabad win local hearts and minds.

The Jewish state’s reputation in Africa is a mixed one, spanning from the sale of weapons and facilitating the plunder of natural resources to helping build life-saving infrastructure and medical facilities.

But, Bentolila said, “the majority of Israelis and Jews are recognized in Africa as a force for good that is helping the continent become a little bit better with every passing year.”