The US Senate has voted unanimously to recognize the genocide of Armenians by the Ottoman empire, in defiance of both Donald Trump and the Turkish president, Recep Tayyip Erdoğan.

The Senate resolution formally acknowledges the mass killing of an estimated 1.5 million Armenians between 1915 and 1922 as an act of genocide. Coming after a similar measure adopted in October by the House of Representatives, it marks the culmination of more than 50 years of campaigning by Armenian Americans, who called on the president to follow Congress’s lead.

Until now, Turkey had used its leverage as a US Nato ally to stifle recognition of the Armenian genocide, and has threatened consequences for bilateral relations. The White House, anxious not to exacerbate an already tense relationship with Erdoğan, had sought to stall a Senate vote.

On three occasions over recent weeks, different Republican senators took to the Senate floor to block the Armenian genocide resolution. But on Thursday, Trump appeared unable to persuade any of his Senate supporters to oppose the measure.

“The president just ran out of Republican senators. He put the first three guys in a difficult spot because they didn’t want to do it,” Aram Hamparian, executive director of the Armenian National Committee of America, said. “Now it’s time of the president to defy Erdoğan’s gag rule.”

Hamparian said the Armenian American campaign for US recognition dates back to the mid-1960s.

“We want to close the book here, to make it as impossible to deny the Armenian genocide as to deny slavery or the Holocaust,” said Hamparian, who added he started campaigning for US recognition in his teens, three decades ago.

The vote brings to 32 the number of countries who recognize the mass killings of Armenians as genocide. France and Italy joined the list earlier this year. In Britain, the three devolved legislatures of Scotland, Wales and Northern Ireland have given formal recognition, but not the UK as a whole.

The chief Democratic sponsor of the resolution, the New Jersey senator Bob Mendendez, was choked with emotion after the vote, saying: “It is fitting and appropriate that the Senate stands on the right side of history.”

Trump’s predecessor, Barack Obama, had promised Armenian Armenians during his 2008 presidential campaign that he would recognize the genocide but reneged once in office.

In doing so, Obama overruled his own senior adviser, Samantha Power, an expert on the issue who had written about the US response to genocide in modern history.

Power tweeted on Thursday that Trump “should now follow suit, on behalf of all the victims and survivors of the genocide and the millions of Armenian-Americans who have fought so hard for this day”.

In her book, A Problem from Hell, Power wrote that the failure of the US to respond to the Armenian genocide a century ago, ensured that the pattern would be repeated.

“We know all too well the horrors that would be repeated later in the 20th century, with the Holocaust and other genocides around the world,” Menendez said in a statement on Thursday. “So here in the Senate today, we break those patterns.”