The AKP, whose roots lie in political Islam, describes itself as a conservative, pro-Western party.
"Because all our institutions conduct their duties in line with what is set out in the constitution," Erdogan said in an interview on the Kanal D TV station.
"If you draw them into politics, then why are we here?" Erdogan asked in the interview on Kanal D.
"For us the armed forces are sacred. They have a special place."
Secularist Turks and the main opposition Republican People's Party (CHP) are hostile to Gul's bid arguing that his presidency would undermine the country's secular system.
The country's secular elite, including army generals, blocked Gul's first bid to become president in April, triggering a parliamentary election in July which was intended to defuse the crisis over the presidency.
The ruling Justice and Development (AK) Party won a landslide victory on July 22.
Analysts say the credibility of the presidential vote was boosted by the participation of opposition parties, apart from the largest secularist party - Republican People's Party (CHP).
The army has not directly commented on Gul's latest bid for the presidency, although General Yasar Buyukanit, the chief of general staff, said in late July that the president should be secular not just in words but also in action.
|The prospect of Gul's presidency has |
promoted huge protests [EPA]
On Tuesday, the army rejected media reports that a secret deal had been struck between Buyukanit and Gul to allow the foreign minister to take the post under certain conditions.
"There is no question of the Turkish armed forces bargaining over any issue with any person or institution," the army had said in a statement.
Gul is expected to defeat his two nationalist and leftist rivals in a third round of voting in parliament on August 28 when he would need just a simple majority to secure the presidency.
The AK Party is aggressively lobbying opposition parliamentarians to secure the extra seats needed to be able to clear the two-thirds majority required in a vote on August 24.
The presidency has traditionally been held by the secular elite and an AK candidate has never been elected president.
Victory for Gul, 56, would complete the AK Party's capture of all key posts in Turkey's political hierarchy.