Jordan's King Abdullah II named his eldest son as heir to the throne Thursday, ending five years of speculation over his successor. Abdullah's move is aimed at avoiding the uncertainty over succession that dogged his father, King Hussein. In 1999, Jordanians were baffled to see Hussein - on his death bed struggling with cancer - strip his brother, Prince Hassan, of the crown and give it to Abdullah. Hassan had been groomed for the Hashemite throne for more than three decades. By naming Prince Hussein Bin Abdullah crown prince, Abdullah can groom the 15-year-old for the throne from a young age. Hussein's appointment came in a royal decree released by the palace. It said the crown prince will hold the title and "enjoy the rights and privileges of his post" effective immediately. Under the constitution, the crown prince has a largely ceremonial role, representing the monarch in ribbon-cutting ceremonies and carrying out other symbolic functions. He has no official political post. Thursday's move was widely expected once the position became vacant in November 2004, when Abdullah removed the title from his half brother, Prince Hamzah, in a sudden palace shake-up. Hamzah, 29, had held the post when Abdullah first ascended to the throne in February 1999 following the death of their father. At the time, Abdullah said Hamzah's position as crown prince was in line with his father's wishes, but later stripped him of the title because it "restrained his freedom" to study, travel and live a normal life. Under the constitution, the crown is automatically ordained to the king's eldest son, unless the monarch decrees otherwise. Prince Hussein - a high school student in Jordan - is the eldest of King Abdullah and Queen Rania's four children. Like his father and other members of Jordan's ruling Hashemite dynasty, Hussein claims ancestry to Islam's Prophet Muhammad.