DUBAI (Reuters) - Iranian President Hassan Rouhani demanded on Sunday that Barack Obama block an extension of sanctions passed by the U.S. Congress, saying Tehran would otherwise "firmly respond".

In a speech to parliament, Rouhani denounced legislation passed by the U.S. Congress to extend the Iran Sanctions Act (ISA) for 10 years as a violation of Tehran's nuclear deal with six major powers. The deal curbs Tehran's nuclear program in return for the lifting of international financial sanctions.

"America's president is obliged to exercise his authority by preventing its approval and particularly its implementation ... and if this gross violation is carried out we will firmly respond," Rouhani said in the speech, carried live by state television.

President Obama is expected to sign the legislation into law, the White House said on Friday.

The U.S. Congress move was a blow to Rouhani, a pragmatist who engineered the diplomatic opening to the West that led to the nuclear deal.

U.S. officials have said the ISA renewal would not infringe the nuclear agreement. U.S. lawmakers have also said the ISA extension would make it easier for sanctions to be quickly reimposed if Iran contravened the nuclear deal.

On Sunday, 264 lawmakers in Iran's 290-seat parliament issued a statement calling on the government to implement counter measures, including relaunching nuclear enrichment halted under the atomic deal, the official news agency IRNA reported.

The diplomatic thaw between Washington and Tehran over the past two years looks in jeopardy with U.S. President-elect Donald Trump taking office next month. He said during his election campaign that he would scrap the nuclear agreement.

Last month, Iran's Supreme Leader Ayatollah Ali Khamenei warned that the extension would be viewed in Tehran as a breach of the nuclear accord and threatened retaliation.

Khamenei and his hardline loyalists have criticized the deal and blamed Rouhani for his government's failure to deliver swift improvements in living standards since sanctions were lifted in January.

(Reporting by Dubai newsroom; Editing by Susan Fenton)