Ahmadinejad was in Saudi Arabia for the meeting at which the Cartoon Rage Controversy was plotted, but that was an OIC meeting, not a state visit. From DPA, with thanks to Sr. Soph:
TEHERAN – Iranian President Mahmoud Ahmadinejad said on Sunday that his first state visit to Saudi Arabia has been fruitful and the two Islamic states agreed to jointly fight what he called “conspiracies” against the Islamic world.
Talking to state-run Iranian TV on his return from Riyadh, he said the two states discussed the latest developments in Iraq, Lebanon and the Palestinian areas and vowed to increase efforts for unity within the Islamic world and blocking discord among Islamic sects.
Ahmadinejad has several times accused the West, chiefly the United States, of seeking to sow discord between Shia and Sunni Muslims in order to strengthen its own status and that of Israel in the Middle East.
The Iranian president had visited Saudi Arabia on Saturday, holding his first meeting with Saudi King Abdullah bin Abdul Aziz in Riyadh.
Afterwards, Ahmadinejad said that Iran and Saudi Arabia were obliged to help meet the needs of the Islamic world.
“Iran and Saudi Arabia are two great and powerful Islamic countries and accordingly have numerous mutual obligations and responsibilities in the Islamic world and Middle East,” he said in a statement on the website of the Iranian presidential office.
The Iranian website quoted Abdullah as saying that Saudi Arabia is the “second home country for Iranians.”
“Today, the Islamic world has many enemies who want to sow discord between the two countries, but our two nations are Muslims with a united belief and therefore enjoying good relations,” Abdullah said.