As a result, the Gallipoli campaign is being recast as a holy war and has become one more element in the polarization of Turkey, split between the secular and the religious.

“The Islamists say, ‘We defeated the infidels,'” said Kenan Celik, a longtime tour guide of Gallipoli’s battlefields. “The Kemalists say the imperialists. It’s two different interpretations.”

Many conservative Turkish municipal governments have been organizing free battlefield tours, with a message delivered by tour guides, Mr. Celik said, of “how great Islam is.”

“They come from central Anatolia,” Mr. Celik said of the flocks of religious tourists in recent years, with a measure of disgust. “They don’t have much education. They’ll believe in anything.”

The shared history has established an enduring connection between Turkey and Australia. In 1934, Ataturk famously wrote a letter to Australian mothers, saying, “having lost their lives on this land, they have become our sons as well.” There is a statue of Ataturk in Canberra, the Australian capital.

Much of the sense of mutual respect between the two countries is founded on stories of camaraderie on the front lines between Australians and Turks, of tossing food, cigarettes and other gifts into opposing trenches.

While there was some of that, it is largely shrouded in myths, said Mr. Stanley, the historian. The truth is, they just wanted to kill one another and win the war, something evident in the letters from the front.