(Refiles to give Khamenei's full name in paragraph 1)
DUBAI, Feb 7 (Reuters) - Iran's Supreme Leader Ayatollah Ali Khamenei has ordered officials to stop feuding, Iranian media reported on Thursday, days after a bitter battle between two of the country's most powerful politicians erupted in public.
The rift between President Mahmoud Ahmadinejad and Speaker of Parliament Ali Larijani has intensified in recent weeks despite repeated calls from Khamenei for unity before a presidential election in June.
"Officials need to take into account the national interest and put their squabbles to one side," Khamenei said during a speech to members of Iran's aerospace force, the Iranian student news agency ISNA reported.
On Sunday, while trying to defend a cabinet minister against impeachment, Ahmadinejad publicly accused Larijani's family of attempting to use their position for financial gain.
The minister was targeted after he appointed former Tehran prosecutor Saeed Mortazavi - an Ahmadinejad ally - as head of Iran's social security office. The appointment outraged MPs after a parliamentary report accused Mortazavi of being linked to the deaths in custody of three protesters in 2009.
On Monday Mortazavi was arrested and taken to prison for two days before being charged and freed. The timing suggested it was linked to Ahmadinejad's accusations.
Reviled by reformers since the violent suppression of mass protests after his disputed re-election in 2009, Ahmadinejad has become increasingly isolated as Khamenei, the final arbiter on all matters in Iran, has distanced himself from the populist but less powerful president.
As he prepares to step down at the end of his second term in June, Ahmadinejad's conservative rivals have taken their cue to move in for the kill and could target others among his allies.
(Reporting By Marcus George; Editing by Pravin Char)