When Morocco became independent in 1956 , Mohammed V , the then King of Morocco , chose to have the capital remain at Rabat . When Morocco achieved independence in 1956 , Mohammed V , the then King of Morocco , chose to have the capital remain at Rabat .