Germany's parliament overwhelmingly voted Thursday to label the killings of Armenians by Ottoman Turks a century ago as genocide, prompting Turkey to recall its ambassador to Germany.

The motion, which was put forward by Chancellor Angela Merkel's governing coalition of right and left and the opposition Greens, passed with support from all the parties in Parliament. In a show of hands, there was one abstention and one vote against.

The vote heightened tensions between Germany and Turkey at a time when Ankara is playing a key role in stemming the flow of migrants to Europe.

Turkish President Recep Tayyip Erdogan said that "this decision will seriously impact Turkish-German relations."

Speaking during a visit to Kenya, Erdogan said recalling the ambassador for consultations was a "first step" and that the Turkish government would consider further steps to be taken in response to the vote. Turkey's foreign ministry also summoned the German charge d'affairs in Ankara to protest the vote as the ambassador was out of town, according to a Foreign Ministry official.

Turkish Prime Minister Binali Yildirim called the German decision a "historic error." Yildirim said that Turkish people take pride in in their past and that "there is no event in our past that would cause us to bow down our heads in embarrassment."

Armenia's foreign minister welcomed the vote.

Historians estimate that up to 1.5 million Armenians were killed by Ottoman Turks around the time of World War I, an event viewed by many scholars as the 20th century's first genocide.

Turkey denies that the killings that started in 1915 were genocide and contends the dead were victims of civil war and unrest. Ankara also insists the death toll has been inflated.

Merkel, who wasn't present for the vote because of what officials said were scheduling reasons, later stressed the close and friendly relations between Germany and Turkey. She added, however, that "controversial arguments over some questions are part of a democratic culture."

Opening Thursday's debate, Parliament speaker Norbert Lammert acknowledged that addressing historical events can be painful.

"But we have also seen that an honest and self-critical appraisal of the past does not endanger relations with other countries," he said. "In fact, it is a precondition for understanding, reconciliation and cooperation."

He said Turkey's current government is not responsible for what happened 100 years ago, "but it shares responsibility for what happens with it in the future."

When other countries have called the killings genocide it has led to diplomatic strife with Turkey, but not lasting damage.

Last year, for example, Turkey temporarily recalled its ambassadors to Vienna and the Vatican after Austria and Pope Francis described the killings as genocide.

The German motion says that the Armenians' fate "is exemplary for the history of mass destruction, ethnic cleansing, expulsions and genocides which marks the 20th century in such a terrible way."

That echoes the words German President Joachim Gauck used in a speech in April last year. His comments marked a shift in Germany's stance after officials previously avoided the term.

Turkey was irked by Gauck's words, which were supported by the German government, but there were no serious consequences for German-Turkish relations.

The motion stresses that Germany is aware of the "uniqueness" of the Nazi Holocaust and it "regrets the inglorious role" of Germany, the Ottoman Turks' main military ally at the time of the Armenians' killings, of failing to stop the "crime against humanity."

It also urges the German government to "encourage" Turkey to "deal openly with the expulsions and massacres" in order to "lay the necessary foundation stone for a reconciliation with the Armenian people."

Merkel said the German government hopes that Turkey and Armenia will work together on how to approach their history.

Armenian Foreign Minister Edward Nalbandian said Germany had made a "valuable contribution not only to the international recognition and condemnation of the Armenian genocide, but also to the universal fight for the prevention of genocides, crimes against humanity."

In February, as the EU prepared for a summit with Turkey, the Greens agreed to withdraw a motion on the killings in exchange for assurances from the governing parties that they would draw up a joint resolution. While it is symbolically significant, it has no legal effect.

Thursday's vote comes amid tension between Turkey and the European Union over the EU's conditions for granting visa-free entry for Turks. Speeding that up was one of the incentives for Turkey to accept a deal with the EU, championed by Merkel, on curbing migrant flows to Europe.

Erdogan's increasingly authoritarian behavior is also causing concern in Germany and elsewhere in Europe.

In Berlin, center-left lawmaker Rolf Muetzenich said that "the motion is not an indictment."

"We as lawmakers will not let ourselves be intimidated ... by whatever side," he said.