Updated

TEHRAN, Iran -- President Mahmoud Ahmadinejad on Wednesday denounced the arrests of several allies, as a months-long power struggle within Iran's ruling system flared between the president and rival hard-liners.

Authorities arrested four senior government officials in the past week in a clear challenge to the president and his chief of staff, Esfandiar Rahim Mashaei. Critics of Ahmadinejad accuse him of trying to set up the controversial Mashaei or another loyalist to succeed him in elections in 2013.

The four arrested officials, who have been accused of corruption, are close to Mashaei, who is despised by hard-line clerics and others who believe he is seeking to undermine the ruling system.

Clerics describe Mashaei as the head of a "deviant current" that seeks to elevate the values of pre-Islamic Persia and promote nationalism at the cost of clerical rule.

"These moves (arrests) are politically motivated. It's clear to us that it is aimed at pressuring the government," the official IRNA news agency quoted Ahmadinejad as saying Wednesday.

The four arrested officials include Mohammad Sharif Malekzadeh, who was forced to resign as deputy foreign minister for financial and administrative affairs. The others are Ali Reza Moghimi and Ali Asghar Parhizkar, who both headed free-trade zones, and Deputy Industry Minister Afshin Roghani.

All of them deny the corruption allegations.

Seeking to limit the damage, the president warned against the arrest of any senior members of his Cabinet, calling that a "red line."

Ahmadinejad has strongly defended Mashaei, whose daughter is married to the president's son, saying attacks against Mashaei are actually directed at him.

Ahmadinejad and Mashaei have been accused of seeking to control the next parliament and plotting to manipulate parliamentary elections slated for March 2012.

The power struggle surfaced in April, when Ahmadinejad publicly challenged Iran's Supreme Leader Ayatollah Ali Khamenei by dismissing the intelligence minister without Khamenei's approval. Khamenei reinstated the minister in a public slap to the president.

Ahmadinejad boycotted Cabinet meetings for 10 days before finally giving in to Khamenei's order. Since then, the president has been under increasing attack by his rivals in Iran's conservative camp.