DAKAR, Senegal — Chinese President Xi Jinping arrived in Africa on Saturday on a four-nation visit seeking deeper military and economic ties while his rival in a bitter trade war, the Trump administration, shows little interest in the world’s second most populous continent.
This is Xi’s first trip abroad since he was appointed to a second term in March with term limits removed, allowing him to rule for as long as he wants. That rang familiar to some of Africa’s long-entrenched leaders.
China is already Africa’s largest trading partner, and it opened its first military base on the continent last year in the Horn of Africa nation of Djibouti, which this month launched a China-backed free trade zone it calls the largest in Africa.
After surpassing the United States in arms sales to Africa in recent years, China this month hosted dozens of African military officials for the first China-Africa defense forum.
Xi is stopping in Senegal and then Rwanda ahead of his participation in a summit of the BRICS emerging economies in South Africa that starts Wednesday. He also will visit South Africa and Mauritius.
The summit comes amid the United States’ billion-dollar trade war with China and tough trade negotiations with other key economic partners.
Last month, the foreign ministers of BRICS members Brazil, Russia, India, China, and South Africa criticized what they called a ‘‘new wave of protectionism,’’ saying US measures undermine global trade and economic growth.
Xi’s Africa visit also highlights China’s sweeping ‘‘Belt and Road’’ initiative that envisions linking Beijing to Africa, Europe, and other parts of Asia via a network of ports, railways, power plants, and economic zones.
While such high-profile projects bring badly needed infrastructure and generate economic growth, US officials and others have warned that African nations are putting themselves into debt to China.
Its government, banks, and contractors loaned more than $94 billion to African governments and state-owned companies from 2000 to 2015, according to the China Africa Research Initiative at Johns Hopkins University.
‘‘Public debt in the median sub-Saharan African country rose from 34 percent of GDP in 2013 to an estimated 53 percent in 2017,’’ according to a report in January by Wenjie Chen and Roger Nord of the International Monetary Fund.
From oil in countries like Nigeria and Angola to rare minerals in Congo, Africa’s natural resources are a major draw for China’s economy, the world’s second largest behind the US China’s voracious appetite for resources such as timber and ivory, however, has taken its toll on Africa’s environment, often with the help of corrupt local officials.
On his first visit to a West African country, Xi will meet with President Macky Sall of Senegal, which, according to the International Monetary Fund, had economic growth of 7.2 percent last year and whose largest trading partner is the European Union, notably France.
The stop highlights China’s interest both in Francophone Africa and in Atlantic Ocean ports, while Senegal positions itself as a gateway to the region.
Already, a Chinese-backed industrial park has appeared outside the capital, Dakar, while rail and road links are being improved as part of an ambitious plan to reach the other end of the continent in Djibouti.
Xi then moves on to Rwanda, becoming the first Chinese president to visit the landlocked East African country, whose economy grew by 6.1 percent last year. He will meet with President Paul Kagame and visit a memorial for Rwanda’s 1994 genocide, which killed more than 800,000 people.
The Chinese leader then will make his third state visit to South Africa for the BRICS summit. South Africa’s economy, one of Africa’s largest, grew just 1.3 percent last year amid a drop in investor confidence because of a corruption scandal around former president Jacob Zuma, who resigned in February.
Finally, Xi will stop in the Indian Ocean island nation of Mauritius, whose economy grew by 3.9 percent last year.
China’s economic push will continue in September with the Forum on China-Africa Cooperation, which brings together dozens of heads of state.