How borders are drawn and enforced has far-reaching consequences, whether we live on either side of them or halfway across the world.

When Israeli prime minister Benjamin Netanyahu visited East Africa this week, he wooed his hosts with determination. Netanyahu, the first Israeli prime minister to visit Africa in three decades, laid a wreath at Rwanda’s genocide museum and watched lions with Ethiopia’s president Mulatu Teshome.

In Uganda, he tactfully ignored a rambling speech by president Yoweri Museveni where the president repeatedly referred to Israel as Palestine and described Middle East peace negotiations as a “waste a of time.” (Museveni also offered to broker talks, saying they would be completed “in a very short amount of time.”)

In Kenya, he pledged support for a 440-mile wall between Kenya and Somalia, called on Israeli businesses to invest in the country, and made his SnapChat debut with a Kenyan flag in the background. The two countries promised to begin direct flights as of next month. Netanyahu even apologized to Nairobians for making traffic worse.

Over the past few years, Netanyahu has been on a campaign to win lost alliances in Africa. Just this year, Israel has hosted presidents from Kenya, Liberia, Ghana, and has hinted at a $13 million development fund for its African partners.

“Israel is coming back to Africa; Africa is coming back to Israel. It’s happening in a big way.” Netanyahu said during the launch of a new parliamentary caucus on Israel-African relations in February.

Israel supported newly independent African states in the 1960s but after the 1973 war and oil crisis, African governments broke off relations out of deference to their Arab partners. Israel’s support of apartheid in South Africa throughout the 1980s cemented the distance. While several countries, including Rwanda, Ethiopia, Uganda and Kenya, reinstated diplomatic recognition in the 1990s, Israel did little to reforge close ties.

Reuters/Tiksa Negeri Israeli Prime Minister Benjamin Netanyahu (L) and his Ethiopian counterpart Hailemariam Desalegn at the National Palace in Addis Ababa.

As a result, African states in the United Nations—a 54-member regional bloc— have largely voted against Israel when it comes to the Palestine question. In 2012 when the UN General Assembly voted to recognize Palestine as an observer state, no African state voted against the resolution. Only five—Cameroon, the Democratic Republic of Congo, Malawi, Rwanda, and Togo— abstained.

As Israel’s allies within the UN have shrunk, Jerusalem has started building a “wall of friendly countries” from the Ivory Coast in the west to Kenya in the east. “We have today a group of countries that are willing to vote with us, and the trend is growing,” Yoram Elron, head of Africa relations for Israel’s foreign ministry told the Financial Times (paywall) in April. “This is one reason why Africa is growing in importance for us.”

AP Photo Israeli Prime Minister, Benjamin Netanyahu, left, and Rwanda’s President, Paul Kagame.

The efforts are starting to pay off. Ethiopia and Kenya have both said they would support Israel’s bid for observer status to the African Union. Palestine has has observer status at the AU since 2013.

Last year, abstentions and no votes from African states prevented Israel from having to open its nuclear facilities to UN inspectors. Nigeria and Rwanda both abstained from a UN Security Council vote on Palestinian statehood last December. Abstentions by Rwanda and Nigeria also helped put down a Security Council resolution in 2014 that called for Israel to withdraw from occupied territories in Palestine.

Israel’s friendship with Ethiopia, home to the largest Jewish community in Africa, is perhaps the most important, though Ethiopian Jewish migrants to Israel have not had an easy transition to put it mildly.

Ethiopia will sit on the Security Council for two years starting next year. Despite Israel’s efforts, Ethiopia’s prime minister Hailemariam Desalegn said the country would continue its support for Palestine.