In a nutshell, I think it's a bit like this: Repressive regime in a very big country trying to control a number of internal factions, lots of oil but low overall wealth, seeking nuclear weapons.
No trust of the west for a number of historical reasons, Israel (a local nuclear power) and the US...