Iranian President Hassan Rouhani says his country will remain committed to a landmark nuclear deal with world powers regardless of the U.S. presidential election result.

Speaking Wednesday in the city of Karaj in a speech broadcast live on state TV, Rouhani said, "If a president is changed here and there, it has no impact on the will of Iran."

Without mentioning any specific names, Rouhani said, "The world is not under the will of a single individual and party. The reality of the world will impose many things on extremists."

He added, "nobody should imagine it is possible to play with Iran."

In his campaign, U.S. President-elect Donald Trump had criticized the deal that capped Iran's nuclear activities in return for lifting international economic sanctions.