Barack Obama pledged to protect Israel and prevent Iran from developing nuclear weapons.