Israel has spent years trying to avoid getting sucked into the vicious civil war raging in neighboring Syria. It’s now wading into the conflict in a way you wouldn’t expect.

On Tuesday, Israeli Prime Minister Benjamin Netanyahu said that he has ordered his government to “find ways” to bring injured civilians from Aleppo, Syria, to Israeli hospitals. That could clear the way for hundreds of Syrians, a country still technically at war with Israel, to cross into the country at the express invitation of a prime minister normally known for his hard-line positions on Iran, the Palestinians, and other issues.

Israel, which shares a long border with the war-torn country, has already treated thousands of both civilians and rebel fighters in field hospitals located right along the border. There has been intense fighting on the Syrian side — including occasional strikes carried out by Israel itself against ISIS targets, such as a strike in late November on a vehicle carrying four operatives from an ISIS-linked group that had opened fire at an Israeli patrol.

One such Israeli-run field hospital, the Ziv Medical Center, has treated more than 2,500 Syrians since 2013, when the civil war began, according to Dr. Salman Zarka, the hospital’s director.

But Netanyahu’s announcement marks the first time Israel has offered to take Syrians wounded on distant battlefields into Israel itself. The city of Aleppo, which has been the bloody epicenter of the fight for control of Syria for the past year, is located almost 400 miles away from the Israeli border.

“We see the tragedy of terrible suffering of civilians and I’ve asked the Foreign Ministry to seek ways to expand our medical assistance to the civilian casualties of the Syrian tragedy, specifically in Aleppo,” Netanyahu said during a reception for foreign correspondents based in Israel. “It’s being explored as we speak.”

The move comes after ground forces loyal to Syrian President Bashar al-Assad — backed by Russian warplanes — finished largely retaking rebel-held parts of the city, though the ferocity of their assault on Aleppo has reduced entire neighborhoods to rubble and killed hundreds of civilians. Jens Laerke, of the United Nations Office for the Coordination of Humanitarian Affairs, described it as a "complete meltdown of humanity" in what had been Syria’s biggest city.

The carnage has somewhat abated in recent days due to an agreement brokered by Russia and Turkey that allowed for the evacuation of tens of thousands of civilians that had been trapped in the city. More than 25,000 people have left the area since Thursday, Robert Mardini, regional director of the International Committee of the Red Cross, said on Twitter.

But thousands are still waiting to be bused to a rebel-held province to the west, and the scale of the suffering and destruction already inflicted by both sides remains overwhelming.

While Israel is not a major player in the Syrian civil war, it is far from being an uninterested party in the war’s outcome, given its location right next door.

Jerusalem tacitly supports Assad staying in power, preferring “the devil we know” to “the demons we can only imagine if Syria falls into chaos, and the extremists from across the Arab world gain a foothold there," in the words of one Israeli intelligence official quoted in the Times of London.

Netanyahu has also worked with Russia to help prevent any accidental clashes between the two countries’ militaries from taking place in the parts of Syria where they both operate.

Yet helping to alleviate the vast human suffering in Aleppo appears to be Netanyahu’s primary reason for making this latest move, not geopolitics.

Some Israelis have called for their government to go even further. In September, opposition leader Isaac Herzog called on the government to allow Syrian refugees into Israel. "Jews cannot be indifferent while hundreds of thousands of refugees are looking for safe haven,” he said.

However, the idea of letting in large numbers of Syrian refugees — a controversial issue in many countries across Europe and in the United States — is an even harder sell in Israel, which has gone to war with Syria on multiple occasions and spent decades struggling to stop terrorist attacks against its civilians. It seems unlikely that any Israeli government, especially Netanyahu’s right-wing one, would allow in significant numbers of Syrians.

Given the scale of the suffering there, though, every little bit helps. Netanyahu’s announcement, unexpected as it may have been, could help wounded Syrians fleeing the violence in their own countries survive and find new homes.