NAIROBI, Kenya — Benjamin Netanyahu, the prime minister of Israel, cruised around the capital of Kenya with an entourage of dozens of Israeli executives, hoping to sell Africa everything from Israeli-made plastic wrap, sprinklers and irrigation pipes to software, CCTV cameras and military equipment. Even cantaloupe seeds.

But Mr. Netanyahu was also on the lookout for something else: precious United Nations votes.

“There are 50 countries in Africa,” Mr. Netanyahu said (actually, there are 54). “Just about all of them,” he continued in an interview in recent days, “could be allies of Israel. They vote at international forums, and I know people don’t believe this, but I think we can change the automatic majorities in the U.N. and so on if you begin to shift this.”

Arab states often galvanize blocs of support within the United Nations to pass resolutions condemning Israeli policies. And with European and other nations increasingly critical of Mr. Netanyahu’s right-leaning government, blaming him for the impasse in the peace process with the Palestinians, reinvigorating ties with Africa seems to be part of a global Israeli survival strategy.

Israel used to be big in Africa.

In the 1960s and early 1970s, Israel felt a kinship to newly independent nations in Africa and dispatched diplomats across the continent, opening two dozen embassies, a lot for a little country.