Chadwick Boseman in “Black Panther.” (Marvel Studios/Disney/AP)

What if African countries had never been conquered and subjected to colonial rule? What if the global slave trade had never stolen 18 million Africans for export to other regions? Africa might look very much like the fictional country of Wakanda, brilliantly brought to life in the new “Black Panther” movie.

“Black Panther” has set box-office records and garnered a 97 percent rating on Rotten Tomatoes. While some might enjoy any Marvel superhero action film with soaring special effects, others are particularly excited to see a big-budget film with a black director, cast and pro-black message — a full century after the first modern blockbuster action film, the infamously anti-blackBirth of a Nation.”

Like many professors of African politics, I was most excited to be able to finally “visit” Wakanda, a country I knew well from the Black Panther comic and have mentioned at the start of every introductory class I have taught for more than a decade.

Wakanda shows how Africa might have developed in the absence of colonialism and the slave trade

Wakanda’s position as independent, strong, wealthy and peaceful is a very useful way to illustrate how slavery and imperialism harmed Africa over the long term. For example, research demonstrates that slavery hurt African economic development; areas that lost more people are not only still poorer today, but are also more internally divided, have weaker political institutions and see higher rates of violence. Wakanda’s isolation would almost certainly have protected it from such effects.

Similarly, the legacy of colonialism in Africa has been largely negative and pernicious, compounded because the European powers tried to run African colonies on the cheap. The most extreme example came in the Congo Free State (now the Democratic Republic of Congo, or Congo), where Belgium’s King Leopold II ran the colony as a personal fiefdom in which the Congolese were routinely tortured, maimed, flogged and raped to the point where the population decreased by (estimates vary here) 8 to 10 million people out of a total population of 16 million. When Congo finally gained independence, there were only 16 college graduates in the entire country. The king, and later the Belgians, looted Congo and murdered its residents while making little investment in its people or infrastructure.

While other countries were not treated as harshly as Congo, colonialism generally produced weak states with poor economies, low legitimacy, high internal division and an increased propensity for conflict. Many negative associations that people in the West have of Africa — poverty, corruption and conflict — are actually the result of interactions with these same Western countries.

In short, Wakanda functions as counterfactual history. It shows us what African political, social and economic development might have looked like uninterrupted by colonization.

Wakanda’s technological development shows real-world African ambitions

Wakanda also is remarkable for its high level of technological advancement. Here, too, the film echoes themes from real life. Early post-independence leaders saw science and technology as a path to autonomy and respect. Demonstrating proficiency with modern technology was especially important to counter colonial claims that Africans were intellectually inferior and incapable of governing themselves.

For example, in the late 1950s, Ghana’s new government made establishing its own Atomic Energy Commission a high priority; in 1961, it even tried (unsuccessfully) to import a Soviet nuclear reactor to generate electricity and enable scientific experiments. Ghana also established a national airline, Ghana Airways, staffed with black pilots and crew. (Around the same time, Marlon Green, an African American former Air Force pilot, was suing Continental Airlines to get U.S. passenger airlines to hire African American pilots in a case that went all the way to the U.S. Supreme Court.) Ghana’s Ministry of Education made science education a top priority, establishing a network of laboratories across the country to teach basic science.

Building African scientific capacity was difficult. Unlike in Asia, independent African countries started from a very low level of human capital. Colonial powers made such little effort to educate Africans that in 1958 there were fewer than 10,000 Africans enrolled in universities anywhere in the world, and the majority of these were from just two countries, Ghana and Nigeria.

In addition, brain drain has proved a significant hurdle to post-independence technological advancement in Africa. From the start, many Africans were trained in the West, making it easy for them to take up permanent residence abroad. Over time, Africa lost one-third of its trained personnel to overseas jobs. The rate of brain drain has only increased with globalization. Right now, the United States alone has more African doctors than the countries of Ethiopia, Ghana, Liberia, Tanzania, Uganda, Zambia and Zimbabwe combined; Bennet Omalu, the Nigerian-born doctor responsible for the discovery of chronic traumatic encephalopathy (CTE) in football players, is a professor in California. Wakanda shows us an Africa that was able to retain and benefit from its indigenous talent.

Reaching Wakanda-like levels of technological advancement on the continent may seem impossible. But in some areas, African countries have made great technological strides. For example, most Africans skipped over ever having traditional landlines, making the continent the fastest-growing market for mobile telephones in the world. They pioneered the use of mobile money. Rural communities not yet on national energy grids are building local microgrids, often powered by solar energy. That said, technological growth is uneven; most African states still need to develop significantly in basic science, especially for research in medicine and agriculture.

Africa’s shortage of scientific and technical personnel is acute. The African continent has only 79 scientists per 1 million people; the United States has more than 50 times that ratio. But consider how much China has changed in the past 50 years. Wakanda offers a vision of an Africa that is strong, independent, peaceful and technologically advanced. Given the right conditions and enough time, this dream could become a reality.

Naunihal Singh is an assistant professor in the National Security Affairs Department at the U.S. Naval War College in Newport, R.I. The opinions expressed are his own and not those of his employer. He is the author of “Seizing Power: The Strategic Logic of Military Coups” (Johns Hopkins University Press, 2016).