Geert Vanden Wijngaert, Associated Press
NATO Secretary General Jens Stoltenberg talks during a North Atlantic Council Meeting at NATO headquarters in Brussels on Tuesday July 28, 2015. For just the fifth time in its 66-year history, NATO ambassadors met in emergency session Tuesday to gauge the threat the Islamic State extremist group poses to Turkey, and the debated actions Turkish authorities are taking in response.

BRUSSELS — NATO proclaimed its "strong solidarity" with Turkey following a rare emergency meeting Tuesday in which members also urged the country not to use excessive force in its fight against extremists, a NATO official said.

"The security of the alliance is indivisible," ambassadors from all 28 NATO nations declared in a joint statement after the meeting, which had been called to assess the threat posed by the Islamic State extremist group and the Turkish response.

They condemned recent terror attacks in Turkey, and called terrorism "a global threat that knows no border, nationality, or religion — a challenge that the international community must fight and tackle together."

However, while public statements stressed NATO unity, the official said members also used the closed-door meeting to call on Turkey not to use undue force and to continue peace efforts with representatives of the Kurdish minority. The official was not authorized to speak on the record and spoke on condition of anonymity.

As the ambassadors were gathering at NATO headquarters, Turkish President Recep Tayyip Erdogan told a news conference in Ankara that it was impossible to advance a peace process with the Kurds as long as attacks on Turkey continue.

The NATO official said participants in the Brussels meeting may have been unaware of Erdogan's remarks.

The special session of the alliance's main political decision-making body, the North Atlantic Council, was held at Turkey's request under a clause of NATO's founding treaty that empowers member countries to seek consultations if they believe their security, territorial integrity or political independence is at risk.

It was just the fifth such meeting in NATO's 66-year history.

"All allies stand in solidarity with Turkey," alliance secretary-general Jens Stoltenberg told reporters after the session, which lasted a little over an hour.

Stoltenberg said the Turks did not use Tuesday's meeting to request military assistance from other NATO members.

"What we all know is that Turkey is a staunch ally, Turkey has very capable armed forces — the second largest army within the alliance," the NATO chief said.

The alliance official who spoke on condition of anonymity said Turkey's allies unanimously spoke at the meeting in favor of its "right to defend itself." One outside analyst said eliciting such support may have been why Turkey sought the unusual forum in the first place.

"I think the main purpose is to give them some reassurance in terms of their bombing campaign in Syria and northern Iraq so that they won't be accused of violating international law," said Amanda Paul, a senior policy analyst and specialist on Turkey at the European Policy Center, a Brussels think tank. "They wanted to cover their backs basically by having NATO say, 'OK it's fine.'"

Recently, an Islamic State group suicide bombing near Turkey's border with Syria left 32 people dead and an IS attack on Turkish forces killed a soldier.

On Tuesday, Turkey said another soldier died after he was shot in the head by a Kurdish militant near the border with Iraq.

After months of reluctance, Turkish warplanes last week started striking militant targets in Syria, and Turkey's leaders agreed to allow the U.S. to launch its own strikes from Turkey's strategically located Incirlik Air Base.

But in a series of cross-border strikes, Turkey has not only targeted IS but also Kurdish fighters affiliated with forces battling the group in Syria and Iraq. On Monday, Syria's main Kurdish militia and an activist group said Turkish troops shelled a Syrian village near the border, targeting Kurdish fighters.

In the battle against IS, the Syrian Kurds have been among the most effective ground forces and have been backed by U.S.-led airstrikes, but Turkey fears a revival of the Kurdish insurgency in pursuit of an independent state.

For some NATO members and independent observers, it's unclear whether Turkey's No. 1 target in the recent attacks is the Islamic State group or the Kurds, said Ian Kearns, director of the European Leadership Network, a London-based think tank.

The Kurds are an ethnic group with their own language living in a region spanning present-day Turkey, Iraq, Syria, Iran and Armenia. The Kurdistan Workers' Party, or PKK, has fought Turkey for autonomy for Kurds in a conflict that has claimed tens of thousands of lives since 1984.

"There is no difference between PKK and Daesh," Turkish Foreign Minister Mevlut Cavusoglu said Monday, using an Arabic acronym to refer to IS.

Erdogan, the Turkish president, told reporters in Ankara that Turkish and U.S. officials were discussing creation of a safe zone near Turkey's border with Syria, which would be cleared of Islamic State presence and turned into a secure area for Syrian refugees to return.

Asked for his opinion, Stoltenberg said, "NATO is not part of these efforts. This is something that is discussed on a bilateral basis between Turkey and the United States."

Mark D. Carlson in Brussels contributed.