A Turkish flag | Tolga Bozoglu/ EPA Turkey recalls Berlin envoy over Armenian genocide vote German lawmakers, especially those of Turkish background, reported receiving threats before the vote.

BERLIN – Turkey recalled its ambassador to Berlin on Thursday shortly after the German parliament passed a resolution describing the 1915 killings of Armenians as genocide.

Turkey's state-run Anatolia news agency quoted Prime Minister Binali Yildirim saying the Turkish envoy, Hüseyin Avni Karslioglu, had been recalled "for consultations."

A few hours earlier the Bundestag, or lower house of the German parliament, held a vote on the massacres of Armenians that took place a century ago as the Ottoman Empire was collapsing. As expected, German lawmakers declared it an act of genocide — and Bundestag leader Norbert Lammert denounced a series of threats against MPs, “particularly those with Turkish roots."

“As much as we accept any sort of criticism … it has to be clear that threats meant to prevent a free formation of opinion in the German parliament are inacceptable,” Lammert added.

During World War I, authorities of the Ottoman Empire — an ally of the German empire, whose role was also mentioned in Thursday’s Bundestag resolution — deported and killed hundreds of thousand of members of the Christian Armenian minority.

According to different estimates, between 800,000 and 1,5 million people died between 1915 and 1916. Turkey acknowledges there were deaths and deportations, but says the death toll has been exaggerated and rejects the term “genocide."

Earlier this week, Turkish President Recep Tayyip Erdoğan called Chancellor Angela Merkel to say Berlin should use "common sense" in the decision. In a statement before leaving on a trip to Africa, he warned that such a resolution would “damage future diplomatic, economic, business, political and military relations between the two countries — we are both also NATO countries.”

The vote, originally planned for the 100th anniversary of the massacre last year, had been delayed repeatedly to avoid tension between Germany and Turkey. While Berlin describes the resolution as a matter of revisiting history, Ankara sees it as an act of power politics tied to current political events.

It comes at an awkward moment for the deal between the EU and Turkey — which has been driven by Merkel — whereby Turkey helps Europe with its refugee crisis in return for visa liberalization for Turkish citizens.

Relations between Berlin and Ankara were already put to the test by German comedian Jan Böhmermann affair, who read out an obscene poem on German TV about Erdoğan. The Turkish leader pushed the German government to prosecute the comedian under an obscure German law against insulting foreign heads of state.

Martin Pätzold, a MP for Merkel’s conservatives whose mother is Armenian, had pleaded before Thursday's vote that it was too important a subject to be mixed up with the refugee deal.

Neither Merkel nor vice chancellor Sigmar Gabriel nor Foreign Minister Frank-Walter Steinmeier were in the chamber for the vote, which did not require the presence of all MPs.

“This is a day of resolution, a day of justice,” Sevim Dağdelen, lawmaker from the opposition Die Linke and one of the reported recipients of threats ahead of the vote, said after the resolution was passed nearly unanimously — just one MP voted against it and two more abstained.

A group of Armenians in the visitors' gallery of the Bundestag held up signs saying “Thank you.” Some burst into tears.

Armenian visitors in German Parl. hold up "thank you" signs, following approval of resolution to recognize genocide pic.twitter.com/Ltoaoij6s0 — Janosch Delcker (@JanoschDelcker) June 2, 2016

Mari Davidian, a 51-year-old Armenian whose family came to Germany from Turkey when she was seven, said her grandparents were orphaned in the genocide. She was surprised by the strength of support in the German parliament.

“This means that, finally, a reappraisal of history can begin,” Davidian said, hugging her daughter.

This story has been updated with details and background.