A truck drove into a department store in central Stockholm, April 7, killing at least four people. (Sarah Parnass,Dani Player/The Washington Post)

Nice, Berlin, London and now Stockholm. Over the past year, terrorist attacks using vehicles have become a sad fact of life in Europe. Such attacks are obviously appealing to would-be mass murderers: In most European nations, a truck is far easier to acquire than a firearm or explosives, and sometimes even deadlier. Groups such as the Islamic State and al-Qaeda have taken note, specifically suggesting that a car could be a good weapon to harm civilians.

For authorities, the attacks represent a major problem. Guns and explosives can be banned, but motor vehicles are vital for many city-dwellers. So how do you protect a city from an attack like this? There is one commonly used solution, but it’s far from perfect.

Since the 1990s, many cities in North America and Europe have been installing physical obstacles designed to stop vehicles driving close to the site of a likely terror target. These measures actually predated the rise of the modern vehicle attack — instead, they were largely designed to tackle car bombs, like those used to attack U.S. embassies in East Africa in 1998.

When they were first installed in Washington, they were often crude: huge concrete blocks known as “jersey barriers” placed around monuments and government buildings. They served a purpose but didn’t look great. As the headline on a story by Benjamin Forgey, The Washington Post's architecture critic at the time, put it in 1998, “Does safe have to mean ugly?”

In 2006, tourist navigate around jersey barriers placed in front of the Lincoln Memorial in Washington for security. (Lauren Victoria Burke/AP)

Since then, a number of developments have made these obstacles more subtle. Permanent protective bollards, sleeker in design, are believed to have prevented a number of terrorist attacks: One example is the 2007 Glasgow Airport attack, where a car filled with propane canisters was blocked from driving into the terminal by bollards, likely preventing serious injury to civilians.

In the United States, crash- and attack-resistant bollards are now installed outside “military and governmental buildings and domestic structures and areas of higher security levels,” according to the National Institute of Building Sciences. Similar measures are taken in countries like Britain, where many bollards and barriers are designed to stop a seven-ton truck traveling at 50 mph.

The design of these obstacles is often thoughtfully integrated into their environment. These days, they are often disguised as flower pots, decorative walls or even sculptures — the artful bronze bollards outside New York City’s Financial District are an obvious example. Bollards that slide into the ground, hidden from view until needed, are also common. The aim is to provide security without making a city feel like a fortress.

A slow camera shutter speed captures the movement of people walking down Wall Street past he bollards near the entrance of the New York Stock Exchange on Wall Street in New York in2013. (Anthony Behar/Sipa USA)

However, while these obstacles have proliferated outside government buildings and other high-profile areas, they have left other areas exposed.

Jon Coaffee, a professor of Urban Geography at the University of Warwick in England who studies the impact of terrorism on urban areas, says that in U.S. cities like Boston, he can easily see where “so-called hostile vehicle mitigation measures” had been installed. “Equally there are many potential targets that are undefended,” Coaffee wrote in an email. “The key question raised by the Stockholm incident, as was raised recently in London, is can we or should we seek to secure all crowded locations in a city?”

Groups such as the Islamic State have exploited this, encouraging attacks on so-called “soft targets” that are at best weakly protected. The attack in Nice, France, took place upon a beachfront promenade; in Berlin, it was a Christmas Market; in Stockholm, a shopping center. Even in the London attack, which targeted the (well-protected) center of Britain’s political world at Westminster Palace, most of the carnage took place on the adjacent bridge.

The abundance of soft targets means that protecting them all is difficult, if not impossible. After the attack in Germany, Berlin Police Chief Klaus Kandt told reporters that bollards and other obstacles could not completely prevent an attack. “There are an almost unlimited number of soft targets, that’s simply the fact, so there are many possibilities to kill people with a truck,” he said.

However, the Berlin attack highlighted another way legislation may help. The 40-ton Scania PRT truck used in the attack is thought to have deployed its brakes when the attack occurred, thanks to an advanced emergency braking system now mandated by the European Union on heavier trucks. German government officials have said that the technology may have “saved lives,” Süddeutsche Zeitung reported in December.

More on WorldViews

An obscure E.U. regulation may have saved lives in the Berlin Christmas market attack

A scholar of Islamist extremism makes a prediction: Europe’s problem will get worse