The German diplomatic service, while one of the best in the world, has suffered from being led by foreign ministers who have doubled as party leaders of the junior partners in successive governing coalitions. The French service, a historical example of excellence, has made significant progress in addressing the lack of diversity in its ranks, but a majority of its most senior diplomats remain white men.

The United States Foreign Service is under assault by the Trump administration, which is driving out dozens of its members and seeking to cut about a third of its budget, resulting in the lowest morale in recent history. The British Foreign Office neglected formal training for its diplomats for decades; it finally established a dedicated center in 2015, but it hasn’t instituted mandatory professional development.

With all the history and professionalism of Western European diplomatic services, why were those countries so shocked by and unprepared for the influx of refugees in 2015? Being intimately familiar with conditions, events and trends in foreign countries is an essential part of a diplomat’s job. Most refugees came from conflict zones. Good diplomats should have anticipated those developments and prepared policy analyses and recommendations for their leaders back home.

And why has it been so difficult for the West to exert meaningful influence with Turkey, a NATO member, to prevent what Western officials view as destabilizing actions, such as its current attack on Syrian Kurds? There are certainly many reasons, but insufficient diplomatic skill and creativity are part of the problem.

Chronic underfunding is also crippling the diplomatic services of rising powers, including those of India and Brazil, which are grossly overextended. India, for example, is struggling to run more than 160 missions with 600 diplomats.

Even China has failed to make a sufficient investment in diplomacy, choosing instead to focus almost exclusively on its military, whose budget is almost 20 times bigger than what it spends on foreign affairs. Not surprisingly, the Chinese Ministry of Foreign Affairs has much less clout in policymaking than its counterparts in other countries.

But most countries do not have proper professional diplomatic services, particularly in Africa, Latin America and the Middle East, and even in some parts of Europe and Asia. True, they do have civil servants in their ministries of foreign affairs, some of whom are sent to work in embassies and consulates from time to time. Many of these officials have degrees in international affairs or a related field, and that’s enough for many governments to assume that they can excel in diplomacy.