ISTANBUL (AP) — On the practice range one day, a Turkish military officer noticed that one of the conscripts under his command, an ethnic Kurd, had a good eye.

"For you to be shooting so well, you must be a terrorist," the officer joked, using a common term in Turkey for Kurdish rebels at war with the state. It was an awkward moment for conscript Kenan Kizildag, who recently recalled the remark and his reply:

"If I were a terrorist, then I would be in the mountains, not down here."

The conversation ended and the two got on fine afterward, according to Kizildag, a 26-year-old construction worker in Istanbul who finished his 15-month military service in 2007.

The exchange captures the sometimes conflicted role of Turkey's Kurdish minority in one of NATO's biggest military forces, which is fighting a low-level but resilient Kurdish insurgency. Roughly 40,000 people, including many civilians, have died in the combat, which marks its 26th anniversary on Aug. 15.

Virtually all Turkish males are required to serve in the armed forces for up to 15 months; some with higher education or time spent overseas can secure much shorter terms.

Turkey's pained relationship with its Kurds, whose identity was virtually ignored until about 20 years ago for fear it would sunder the country on ethnic lines, is perhaps the biggest internal test for an ambitious country seeking to build its international stature. The government has taken steps to undo a long history of discrimination against Kurds, but a surge of fighting this summer has largely derailed those efforts.

If not quite taboo, the topic of Kurds in the Turkish military is sensitive in an institution where an image of unity is paramount.

"It's the Pandora's box," said Umit Cizre, a military expert at Istanbul Sehir University. "Nobody has opened it yet."

Up to one-fifth of Turkey's 72 million people are Kurds, meaning tens of thousands serve in the armed forces at any one time.

Their language is barred in schools, parliament and most official settings, and Kurdish politicians are frequent targets of prosecution. Yet most Kurds in the military simply fulfill a rite of passage that opens the way to jobs and social acceptance. Some fight the PKK rebel group that claims to represent them. Some who turn professional rise to a high rank.

The military did not immediately respond to inquiries. Active duty soldiers are not allowed to speak to the media without permission.

Several Kurds, all former conscripts, told The Associated Press that they were treated relatively well by the command, but ethnic jokes and slurs were a feature of barracks life that they had to endure, mostly in silence.

"Sometimes you hear racist remarks about Kurds being spoken among soldiers. It is very offensive," said 31-year-old Burhan Ekinci, now a journalist with Taraf newspaper, which has reported on alleged military negligence and misconduct.

Ekinci served six months in Bingol province, where rebels are active, and he is from Diyarbakir, in the mainly Kurdish southeast of Turkey. He recalled a sergeant who asked him where he was from, and then said he didn't like people from Diyarbakir.

"I asked him what he meant," Ekinci remembered. "He said, 'I think you understand perfectly.' And I told him not to worry because if he didn't like people from Diyarbakir, then they didn't like him either."

He stressed, however, that he did not experience any discrimination at the official level.

Anecdotal evidence suggests the military is comfortable assigning Kurdish soldiers to combat against the PKK — Ekinci called deployments for ethnic Kurds and Turks alike a "complete lottery" — and indeed Kurdish soldiers are often familiar with the terrain in the rugged east.

In World War I, Kurds and Turks under the Ottoman Empire fought allied forces at Gallipoli, and in battles leading to the 1923 foundation of Turkey. Their descendants proudly display medals inherited from veterans of those campaign.

While Turkish commanders today praise soldiers of Kurdish origin who perform well, there is an effort to gloss over any tension, according to former soldiers. One said he heard a lecture about how the Kurdish problem was stirred up by foreign agitators intent on dividing Turkey.

Today, at roll calls, conscripts shout their hometown along with name and rank, making it easy to identify whether a soldier is from a Kurdish area or not.

Some former soldiers spoke on condition of anonymity because they feared authorities would view their comments as subversive, even though one of them, a Kurdish medic, survived a deadly PKK attack and was commended for treating wounded soldiers.

"'You'll be fine if they attack. They're not going to kill you,'" the ex-soldier recalls his comrades saying in jest before the assault.

He spent most of the fighting pinned down in his clinic, and treated a soldier who was shot in the lungs. As he lay on the floor, he imagined his own funeral, with commanders extolling his sacrifice and calling him a "martyr," a term reserved for slain soldiers.

"This is not how I want to go out. This doesn't make sense at all," the former soldier remembers thinking. He spent the night treating the injured until helicopters arrived to evacuate them, and a commander gave him a citation.

When the medic pronounced his mostly Kurdish hometown, the commander seemed surprised. "There's a lot of terrorism there," he said, according to the ex-soldier.

The case of 28-year-old Ercan Yesilkaya is murky. The Kurdish conscript allegedly shot himself in the head just before the end of his guard shift at midnight on July 14 at the prison in the central province of Yozgat where he was stationed as a chef. Four cigarette butts were found near the body, a glimpse into his last moments.

Investigators found a signed note in his chest pocket: "Nothing and nobody has caused me to kill myself (I am fed up). This happened of my own will."

There is no evidence to suggest his alleged suicide was linked to ethnic tension, but his family became suspicious, and his sister, Nargul, traveled to the prison.

"I felt a sense of tension in the atmosphere within the military unit, there seemed to be divisions among ethnic groups. I felt that because Ercan was Kurdish, he may not have been welcome in the group, which was largely Turkish," she said.

Ercan's uncle, Ahmet Ozdemir, sat on a sofa in an outlying district of Istanbul and described torn feelings about Turkey's war.

"If it's a soldier who dies, we feel sorrow. If it's a guerrilla who dies, we feel sorrow," he said. "Even if he's called a terrorist, we still feel that sorrow."