Tokyo: The Japanese, who inhabit one of the safest countries in the world in terms of law and order, have been reminded in brutal fashion that the world is a dangerous place.

In a shock to a country that can feel insulated from distant geopolitical problems, two of their own have reportedly been killed by Daesh militants in Syria, the latest apparently beheaded in a video posted online this weekend by militant websites.

This island nation, which once closed itself to the outside world for two centuries under Samurai rule, has been venturing out as it has in fits and starts for the past two decades. Prime Minister Shinzo Abe, in a bid to restore Japan’s position in the world, has been driving his country to play a larger international role, most controversially seeking to loosen constitutional restraints put on its military after the Second World War.

And as Japan has learned before, venturing out inevitably carries risks.

The question then is whether the risks will drive Japan back into its shell. Analysts say it is too early to predict the impact of the crisis on government policy and the public psyche. Past experience, though, suggests that Japan may, after some handwringing, continue what has been a very gradual expansion of its military role. A major test could come in the spring, when the parliament is expected to take up Abe’s proposals to allow its Self-Defence Forces to do more.

“Contrary to what some people are arguing, the ongoing hostage crisis will have little to no effect as far as official policy or public opinion is concerned,” predicts Jun Okumura, an independent analyst.

Since coming to power about two years ago, Abe has traveled far more widely than his predecessors, meeting dozens of his counterparts in Latin America, Africa, Europe and Southeast Asia.

His most recent trip was to the Mideast, where he pledged humanitarian and development aid last month for the countries battling the Daesh militant group. A larger global role includes joining the effort against terrorism, even if Japan cannot contribute troops under a post-Second World War constitution that limits its military to defending Japan.

“All that, we shall do to help curb the threat [Daesh] poses,” Abe said in a January 17 speech in Cairo, using an acronym for the militant group that controls parts of Syria and Iraq. “I will pledge assistance of a total of about $200 million for those countries contending with [Daesh], to help build their human capacities, infrastructure, and so on.”

His words apparently reached Daesh, which in a video three days later accused Japan of donating money “to kill our women and children” and threatened to kill two Japanese men it held as hostages.

It’s not the first time Japan has faced such a crisis. It ventured out in a relatively big way in 2004, sending several hundred troops to Iraq to help in the reconstruction. Though in a non-combat role, the overseas deployment was a significant break with past policy. It required special legislation and stretched the self-defence limits imposed by the post-war constitution — some say too far.

At home, many opposed the deployment. In Iraq, half a dozen Japanese were kidnapped. One was found decapitated, his body wrapped in an American flag, after then-Prime Minister Junichiro Koizumi refused demands to pull the troops out of Iraq.

Such violence is shocking anywhere, but particularly so in Japan, which has among the lowest murder and gun ownership rates of anywhere in the world. The troubles of the Middle East can seem farther away than in the United States or Europe. Unlike New York or Paris, Tokyo hasn’t seen attacks by radicalised individuals. The most infamous terrorist act in recent times was home-grown, the release of poisonous gas in the Tokyo subway system by a religious cult in 1995.

“It is unusual for Japan, which has not participated in the military operations [against Daesh], to be targeted,” the Mainichi, one of Japan’s major newspapers, observed in an editorial. It concluded: “We no longer live in a time when we can feel safe, just because we are Japanese.”

In the decades after the Second World War, when Japan ventured out in a really big way with disastrous consequences, the country focused on economic growth and relied heavily on the US, its vanquisher and new ally, for protection from global threats.

It still does today, but Japan has been edging its own military overseas for more than 20 years now, though in a very cautious way.

The risks came home early. Over public opposition, the Japanese parliament passed a law in 1992 that allowed it to dispatch troops and others to UN peacekeeping operations. A Japanese police officer was killed in Cambodia the following year.

While the police withdrew from peacekeeping for several years afterward, the Cambodia mission was completed, and the military has continued to join others in the years since, notes Okumura, the analyst.

The 2004 killing of one of the hostages in Iraq increased pressure on the government to pull out its troops, but that mission continued too, until 2006.

A decade later, Abe is trying to push the edge of the envelope a little further. He laid the groundwork when his Cabinet reinterpreted the constitution last year to allow Japan, in some situations, to defend allies that come under attack. He still needs lawmakers to approve legal changes necessary to empower the military to do that and more. Heated debate is expected, but with his party holding a solid majority in parliament, Abe may well get his way.