To witness the devastation wrought by the earthquake that just leveled Nepal is to behold a disaster that seems so random and freakishly rare that it’s almost not worth worrying about -- like the threat of a lightning strike.

Yet major earthquakes in dense population centers have killed more people over the last decade than all other natural disasters combined. In the wake of this most recent tragedy, scientists have a grim message to impart: The trauma that earthquakes inflict on human life and property worldwide will only worsen.

And that is the case despite the fact that scientists, architects and other experts already possess the knowledge and technology to prevent the vast majority of deaths caused by earthquakes. What’s lacking has been the resources and political will necessary to set up basic protections in some of the world’s most vulnerable regions.

Earthquakes claimed 750,000 lives between 1994 and 2013, and experts warn that the world is primed to set a record high for the number of deaths caused by a single incident.

“An unprecedented death toll exceeding 1 million is now possible in a single earthquake, should it occur near one of the world's megacities,” Roger Bilham, a geologist at the University of Colorado, has said.

Catastrophic devastation is possible despite the sophisticated tools that scientists now possess to detect seismic activity in quake-prone regions. Architects have also mastered building techniques that reduce death tolls even for the largest earthquakes, and some governments have installed early warning systems to give citizens a few precious seconds to seek safety.

So why does the death toll continue to rise?  The answer has partly to do with global population trends. There are roughly seven billion people on the planet now; by 2050, the world’s population will reach nine billion. And more people are moving to major urban centers. More than half the world’s citizens live in cities and the United Nations predicts that by 2050, two-thirds of the global population will reside in cities.

It’s tempting for urban planners to believe that advances such as modern building codes can temper the risks of massive earthquake casualties, but the populations of developing regions rife with substandard dwellings are growing at twice the rate of populations in developed nations, and many of those residents remain unprotected. GeoHazards International, a nonprofit focused on earthquake preparedness, says that nine out of 10 people who lived in earthquake-prone regions in 2000 were in developing countries. Eight of the world’s 10 largest cities rest on fault lines, including Jakarta in Indonesia and three cities in India. Hastily built apartment buildings and offices in these cities do not meet international building codes and can turn into death traps during an earthquake.

“The former villages and towns that earthquakes have visited in the past are now cities and megacities, and the building stock of many of the world's megacities now include fragile buildings, assembled without adequate earthquake resistance,” Bilham writes.

In fact, when GeoHazards evaluated at-risk cities with poor building code compliance in 2001, the organization ranked Kathmandu in Nepal, some 50 miles from the epicenter of Saturday’s earthquake, as the world’s most vulnerable. Istanbul, Turkey; Delhi, India; Quito, Ecuador; and Manila, Philippines; were also among high-risk cities the group warned could suffer deaths in the tens of thousands in the event of a large earthquake.

The loss of life from earthquakes seems to be greatest in countries and cities where three factors come together: poverty, corruption and public ignorance. In fact, 90 percent of all deaths from earthquakes occur in impoverished nations where rates of corruption are high -- in places such as the Philippines, El Salvador, Indonesia, Afghanistan, Yemen, Armenia and Papua New Guinea.

Poverty can prompt residents to build homes from materials of poor quality in places that are prone to earthquake damage, such as on steep slopes susceptible to landslides. Bilham calls these homes “an unrecognized weapon of mass destruction.” City-dwellers may not realize they are putting themselves in danger because they lack access to information about the seismic risks of a region or that information does not exist in the first place.

A 2014 report by the Centre for Research on Epidemiology of Disasters states: “Today, not only are more people in harm’s way than there were 50 years ago, but building in flood plains, earthquakes zones and other high-risk areas has increased the likelihood that a routine natural hazard will become a major catastrophe.”

In Nepal, 80 percent of new buildings are built “informally” and without engineering expertise, according to Engineers Without Borders UK. The nation’s recommended building code was updated in 1994, according to CNN. Nepal was ranked 126 out of 175 countries in the 2014 Corruption Index by Transparency International.

Santosh Gyawali, a disaster specialist with USAID Nepal, warned in a 2013 newsletter that implementation of the new code was “progressing very slowly, putting lives at risk” and urged faster action, citing predictions that a large earthquake in Kathmandu could result in at least 100,000 deaths, 300,000 injuries and 1.6 million displaced residents. The USAID Office of Foreign Disaster Assistance launched a program in Nepal in 2012 to help towns and cities to more appropriately issue building construction permits, and train 400 engineers on the latest construction techniques.

High rates of corruption also play a deadly role: For example, officials may accept bribes from contractors who cut corners by using inferior building materials including weakened concrete and brittle steel. The vast majority -- 83 percent -- of earthquake deaths that occurred from collapsed buildings over the past 30 years were in countries with high rates of corruption.

The differences in earthquake death tolls between any two nations can often illustrate disparities in building code compliance. The magnitude-8.9 earthquake that struck 230 miles northeast of Tokyo in 2011, for instance, was 1,000 times stronger than the devastating magnitude-7 earthquake that hit Haiti in 2010. But about 15,900 died in the Japanese event, while the Haitian quake killed 230,000 people.

"The reason for this difference is that Japan is one of the most earthquake-ready countries on Earth, Haiti was not," Richard Allen, a seismologist at University of California, Berkeley, wrote in a post for Scientific American.

Earthquake experts have been known to use a grim adage to describe the real danger that residents face when a quake strikes an economically struggling country: “Earthquakes don’t kill people, buildings kill people.”

The devastation in Nepal illustrates that painful view.