In his first state visit to Iran , Prime Minister Nuri Kamal al-Maliki discussed the security situation in Iraq with the Iranian president , Mahmoud Ahmadinejad , and asked for his support in quelling the violence that threatens to fracture Iraq . ''