Armenian-Americans march in protest in California demanding recognition of genocide by Turkey.

The US Congress on Thursday formally recognized the 1915-1917 murder of up to 1.5 million Armenians as genocide.

The Senate's passage of the repeatedly stalled resolution is expected to anger Turkey, which denies there was a genocidal mass murder, insisting the Armenians died as a result of World War I.

In passing the resolution, the United States joined 30 other countries recognizing Armenia's claim of genocide, which took place in the final years of the Ottoman empire that was centered in Istanbul.

"It is fitting and appropriate that the Senate stands on the right side of history," said Senator Robert Menendez, who pushed the resolution through.

"I am thankful that this resolution has passed at a time in which there are still survivors of the genocide who will be able to see the Senate acknowledges what they went through," he said, fighting back tears.

Armenian Prime Minister Nikol Pashinyan called the Senate move "a victory of justice and truth."

"This is tribute to the memory of 1.5 million victims of the first #Genocide of the 20th century and bold step in promotion of the prevention agenda," he tweeted.

But the government in Ankara condemned the move, warning it will impact US-Turkey ties.

"The behaviour of some members of the US Congress is damaging the Turkish-American ties," Turkey's presidential communication director Fahrettin Altun said on Twitter.

The resolution declares that it is US policy "to commemorate the Armenian Genocide through official recognition and remembrance."

It is also policy to "reject efforts to enlist, engage, or otherwise associate the United States government with denial of the Armenian Genocide or any other genocide."

The resolution, which had already passed the lower House of Representatives, had been blocked multiple times by allies of President Donald Trump, who has sought a closer relationship with NATO ally Turkey and President Recep Tayyip Erdogan.

Turkish anger

In recent months Trump has sought to work with Erdogan to prevent a full-fledged Turkish invasion of northern Syria, while having Turkish troops or their proxies establish security in the area after the pullout of US forces.

Trump has also struggled with rising NATO and Pentagon frustration with Erdogan over his decision to purchase a Russian-made S-400 missile defense system that could threaten NATO security.

Standing next to Trump at the White House in November, Erdogan warned that "some historical developments and allegations are being used in order to dynamite our reciprocal and bilateral relations."

During that visit, one of Trump's top backers in the Senate, Lindsey Graham, blocked the resolution's passage after it had been reintroduced for consideration during Erdogan's visit.

Graham had said his objection to the measure was not "to sugarcoat history or try to rewrite it, but to deal with the present."

Congress overall has been less sympathetic to Turkey than Trump.

In a sign of strains in the relationship, the Senate Foreign Affairs Committee on Wednesday adopted a bipartisan bill that sets tough sanctions against Turkey and its leaders over its offensive in Syria and purchase of the Russian missile system.

The bill could place Trump on the spot if the bill arrives on his desk for his signature.

"This is what happens when the United States abandons principled diplomacy," said Brett McGurk, the former US special envoy to the conflict in Syria and Iraq.

"Trump's relationship with Erdogan has undercut any serious effort to nudge Turkey in a more constructive direction. As in most other areas of foreign policy at the moment, it's only getting worse."

Lawmakers challenged Trump to give his endorsement to the genocide resolution, even though it does not require his formal signature.

"The Congress is now united in speaking the truth about the genocide. It's time for the president to join us," said Adam Schiff, the Democrat who sponsored the measure in the lower house.