Iran's supreme leader criticized the country's president and foreign minister by name for the first time over his concerns about the 2015 nuclear deal, saying Wednesday they didn't act as he wished in carrying out the agreement with world powers.

Ayatollah Ali Khamenei, who has final say on all matters of state, made the statements before hardline students gathered to hear a Ramadan lecture amid heightened tensions with the United States.

The comments were also posted on Khamenei's official website Wednesday night.

"In some extent, I did not believe in the way that the nuclear deal was implemented. Many times I reminded both the president and the foreign minister," Khamenei said.

FORMER CIA DIRECTOR JOHN BRENNAN ON CAPITOL HILL AT DEMOCRATS’ INVITATION FOR IRAN BRIEFING

The criticism came a day after top officials in the Trump administration were dispatched to Capitol Hill to brief lawmakers about the escalating tensions with Iran, saying afterward they are focused on trying to deter attacks and avoid war.

The administration sent Secretary of State Mike Pompeo, Acting Secretary of Defense Patrick Shanahan and Joint Chiefs of Staff Chairman Joe Dunford to brief lawmakers in the House and Senate in separate, closed-door sessions.

The competing closed-door sessions came after weeks of escalating tensions in the Persian Gulf that have raised alarms over a possible military confrontation with Iran.

Khamenei’s remarks show the internal pressure both President Hassan Rouhani and Foreign Minister Mohammad Javad Zarif, relative moderates within Iran's Shiite theocracy, now face amid the U.S. tensions.

Iranian hardliners for years have criticized the accord for giving too much away to the West.

The fact that Khamenei publicly blamed the deal's unraveling on the president and foreign minister indicates a limit on their power. It also signifies the growing power of hardliners within Iran, a year after President Trump pulled America from the landmark accord.

TRUMP SAYS WAR WILL MEAN 'OFFICIAL END OF IRAN,' WARNS 'NEVER THREATEN THE UNITED STATES AGAIN'

Iran struck the nuclear deal in 2015 with the United States, the European Union, France, Germany, the United Kingdom, Russia and China. Iran agreed to limit its enrichment of uranium under the watch of U.N. inspectors in exchange for the lifting of economic sanctions. Trump said he withdrew from the deal because it didn’t address Iran’s ballistic missile program or its involvement in regional conflicts. The move halted promised international business deals and dealt a heavy blow to Iran’s already anemic economy.

Since then, the Trump administration has said any country that imports Iranian crude oil will face U.S. sanctions.

Earlier this month, Iran set a 60-day deadline for world powers to negotiate the terms of its 2015 nuclear deal.

CLICK HERE TO GET THE FOX NEWS APP

President Rouhani said Iran will stop exporting its excess uranium and heavy water from its nuclear program, as stipulated by the agreement. If the 60-day deadline passes without action, he said Iran will resume higher uranium enrichment.

Fox News’ Alex Pappas and The Associated Press contributed to this report.