BERLIN — If modern Germany has a mantra, it is that people should learn from their history. Yet Berlin’s latest attempt at reconciliation with the past focuses on the mass killing of Armenians by Ottoman Turks a century ago.

And that gesture toward atonement has riled tempers on all sides of the already strained European relations with Turkey.

The argument is set to peak on Thursday in a debate in the German Parliament, which is expected to overwhelmingly approve a resolution that officially declares the century-old Armenian massacres to be genocide — and condemns what was then known as the German Empire, allied with the Ottoman Empire, for failing to act on information it had at the time about the killings.

President Recep Tayyip Erdogan of Turkey said late Tuesday that he had warned Chancellor Angela Merkel of Germany in a telephone call that there could be consequences if the resolution passes.

For Turkey, there is scarcely a more sensitive topic than what German and international historians say was the murder of more than a million Armenians and other Christian minorities from 1915 to 1916. The Turkish government has long rejected the term genocide, saying that thousands of people, many of them Turks, died in the civil war that destroyed the Ottoman Empire.

For Germany, the resolution comes at a delicate time for Ms. Merkel. She is relying on Turkey to stem the flow of migrants from the Middle East to Europe, a policy that has earned her criticism for allying with the increasingly authoritarian Mr. Erdogan.

“If Germany is to be deceived by this, then bilateral, diplomatic, economic, trade, political and military ties — we are both NATO countries — will be damaged,” Mr. Erdogan told Turkish reporters before leaving on an official trip to Africa.

To date, 11 of the European Union’s 28 members have recognized the Armenian killings as genocide and, despite initial protests, Turkey has maintained good relations with several of those countries.

When France approved legislation recognizing the genocide in 2011, Turkey temporarily recalled its ambassador and halted bilateral military cooperation. Such steps now by Ankara would be more complicated and potentially more damaging, as Germany and Turkey are both currently engaged in a NATO operation to stop migrant boats crossing the Aegean Sea from Turkey to Greece.

Ms. Merkel and the two most senior Social Democrat ministers — Vice Chancellor Sigmar Gabriel and Foreign Minister Frank-Walter Steinmeier — will not be in Parliament for the vote, citing prior government business in Germany or abroad.

As the vote approached, debate intensified in Germany, which is home to an estimated three million people of Turkish descent, many of them dual citizens. About 2,000 Turks demonstrated last weekend in Berlin, rallying to the slogan that Parliament is not a court and therefore should not pass judgment.

Even prominent left-wing politicians from the Turkish community are at odds with one another.

Cem Ozdemir, a co-chairman of the opposition Green Party, has been a driving force behind the resolution, which is backed by Ms. Merkel’s conservative bloc and her center-left partners in the coalition government.

All the parties sponsoring the resolution have argued that it is not Germany lecturing the Turks, but a step intended to foster reconciliation between Turks and Armenians by encouraging them to examine their history.

Michael Grosse-Brömer, a senior parliamentary leader of Ms. Merkel’s conservative bloc, recalled that the original intent was to observe the 100th anniversary of the killings last year, and to try to work through a difficult point of history.

“The intent is not, and never was, to incriminate someone,” Mr. Grosse-Brömer said on Tuesday. “The resolution was not intended to damage relations with Turkey, which is a reliable partner and NATO member.”

“It must be possible to work through a historical event that took place 100 years ago,” he added.

But Aydan Ozoguz, the government’s commissioner for integration, said that while she would vote for the resolution, “I still think it is the wrong path” and that it will backfire.

Mr. Erdogan and ultranationalist Turks “will get a huge boost,” Ms. Ozoguz said this week.

“They will use the resolution as proof of a further attack by the West on Turkey,” she said. “Reasonable, considered voices will be isolated and will have no chance to be heard for a long time.”

Mr. Ozdemir, though, argued that the resolution would not be to blame for limiting or stopping historical investigation, since Mr. Erdogan has already “intervened expressly” to squelch any such moves.

The Green leader has also been critical of Ms. Merkel, accusing her of paying little heed to Turkey for most of her decade in power and now being forced to deal with Mr. Erdogan.

Increasingly, the chancellor has engaged in a balancing act. When she visited Istanbul for a United Nations summit meeting last week, she spent time with Turkish intellectuals and lawyers critical of Mr. Erdogan before meeting the president.

After a German comic lampooned Mr. Erdogan with a crude poem, Ms. Merkel initially criticized the verses, giving the impression — which she later said was a mistake — that she advocated curbing the freedom of satire in Germany.

The Armenian resolution has illustrated the many sensitivities of dealing with Turkey. Mr. Ozdemir said that Ms. Merkel and her foreign minister, Mr. Steinmeier, had pushed last spring to postpone the vote on it. That was before the migrant crisis, when ties between Germany and Turkey were less complicated.

Mr. Steinmeier, who left for Latin America before Thursday’s vote, brushed aside Mr. Ozdemir’s criticism, noting that there were always complicating factors in delicate diplomatic matters.

His spokesman, Martin Schäfer, said on Wednesday that the foreign ministry hoped that there would be “no lasting impairments” to relations after Thursday’s vote. “We have a lot we want to tackle with Turkey,” including accession to the European Union, Mr. Schäfer said.

The two sides seem to have taken care to leave themselves room to move forward on issues such as visa-free travel for Turks to Europe, which for Ankara is a crucial point of the broad accord on migrants, and advancing Turkey’s bid to join the bloc. Billions of euros have also been pledged in European aid for Turkey to care for an estimated 2.5 million Syrians and Iraqis who have sought refuge there.

In April, Mr. Erdogan visited the Armenian Patriarchate of Turkey to observe the anniversary of the 1915-16 killings and, in a carefully worded statement, extended his condolences to those who had died.

“We will never give up working for amity and peace, and against those who try to politicize history through bitter rhetoric of hate and enmity, and to alienate the two neighboring nations, who are bound by their common history and their similar traditions,” Mr. Erdogan said.

“With this in mind, I once again commemorate the Ottoman Armenians who perished and extend my condolences to their children and grandchildren.”

Deputy Prime Minister Numan Kurtulmus of Turkey this week urged Germany to “act with caution,” particularly because of its large Turkish community.

“I do not think that the German Parliament will destroy this relationship for the sake of two or three politicians who put the resolution before the Bundestag,” he said.

Correction:June 1, 2016

Because of an editing error, an earlier version of this article misstated the month in which a poem lampooning President Recep Tayyip Erdogan of Turkey was broadcast. It was March, not April.

Correction:July 7, 2016

An earlier version of this article referred imprecisely to the political entity that was allied with the German Empire during the time of the Armenian massacres in 1915-16. It was the Ottoman Empire, headquartered in Istanbul; Ankara is the capital of the Turkish Republic, founded in 1923.