The King of Morocco is not elected. Morocco is a hereditary constitutional monarchy.
The King holds extensive executive powers (commander-in-chief, appoints PM, dissolves parliament, religious leader as "Amir al-Mu'minin"), though the 2011 constitution expanded parliamentary authority.