In a speech to Parliament later broadcast on state television, Supreme Leader Ayatollah Ali Khamenei said: "While there are weaknesses and problems ... the composition of the executive branch is good and appropriate, and the government is working. The government and parliament must help each other."
But he added, in an apparent warning to the populist president not to stray too far out of line, "When the law is passed, the government must implement it with full power and without any excuse," the Los Angeles Times reported.
Khamenei also warned against interference in next year's parliamentary elections. The disputed presidential race two years ago sparked mass protests that threatened revolution.
Ahmadinejad and the ayatollah's conservative clerical circle have been jockeying for power for months.
Despite Sunday's endorsement, political scientist Ahmad Bakhshayesh said the president, "as a lame duck in power, cannot get more room to maneuver. He is no longer the supreme leader's blue-eyed boy."
Celebrity Breakups and divorces of 2014 [PHOTOS]