The Senate on Thursday passed a resolution recognizing the Armenian genocide in Turkey more than a century ago — a slap at Turkish President Recep Tayyip Erdogan, who has denounced the effort.

The White House had directed several GOP senators to block the genocide resolution in recent weeks, preventing it from advancing — until Thursday, when the Republicans abandoned their efforts to block it.

Democratic Sen. Robert Menendez of New Jersey took the issue to floor on Thursday, and then the resolution passed unanimously.

“America’s non-response to the Turkish horrors established patterns that 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, according to Politico.

“Here in the Senate today, we break those patterns. We join the House who voted to do so. Today the Senate shows the same resolve.”

Texas GOP Sen. Ted Cruz worked with Menendez on the proposal, and called its passage “an achievement for truth, an achievement for speaking the truth to darkness, for speaking the truth to evil.”

The bipartisan effort could be the first step in a response to Erdogan for buying Russian weapons systems.

Erdogan visited the White House this fall and held a meeting alongside Trump with Republican senators, temporarily delaying the Senate’s actions against Turkey.

Last week, the administration asked GOP Sen. Kevin Cramer of North Dakota to block the genocide motion, and he told CNN he complied with the White House’s request.

Cramer said the administration wanted the resolution blocked because the president had just met with the Turkish strongman at the NATO summit and was negotiating key agreements with Erdogan.

The House of Representatives last month voted 405-11 in favor of a resolution asserting that it would be US policy to commemorate the killing of 1.5 million Armenians by the Ottoman Empire from 1915 to 1923 as genocide.

The Ottoman Empire was centered in present-day Turkey.

Shortly after the Armenian genocide vote, House lawmakers from both parties also overwhelmingly backed legislation calling on Trump to impose sanctions on Turkey over its offensive in northern Syria, another action likely to inflame relations with NATO ally Turkey.

Turkey accepts that many Armenians living in the Ottoman Empire were killed in clashes with Ottoman forces during World War I, but contests the figures and denies that the killings were systematically orchestrated and constitute a genocide.

Ankara views foreign involvement in the issue as a threat to its sovereignty.

For decades, measures recognizing the Armenian genocide have stalled in Congress, stymied by concerns that it could complicate relations with Turkey and intense lobbying by the Ankara government.

The bill will now go to the White House, though it was unclear whether the president would sign it.

With Wires