Front Palace (Thai: วังหน้า wang na) is the colloquial name for the residence, person and office of Krom Phra Rajawang Bovorn Sathan Mongkol (กรมพระราชวังบวรสถานมงคล pronunciation), which was the Siamese monarchy's equivalent of the viceroyal office of uparaja (อุปราช ; rtgs: Upparat) until the end of the nineteenth century. The office-holder was considered second only to the King, and the heir presumptive. The office is also referred to in English as "Vice King" and "Second King." It originated in the Ayutthaya period and later gained significant powers during the Rattanakosin period. Front Palace occupants were usually a son or brother of the reigning monarch. The office existed until the death of the last occupant, Prince Vichaichan, in 1885. King Chulalongkorn then abolished the office of an heir presumptive, introducing in its stead the Western concept of a crown prince as heir apparent, and styled the new office "Crown Prince of Siam."
The Uparaja or Uparat concept of a Viceroy was of Greater Indian origin. In 1448, Sukhothai King Trailokanat was crowned as the king of Ayutthaya, uniting the two kingdoms. During the 15th century, the Kingdom of Sukhothai, which centered on Pitsanulok, served as the seat of most of Uparats, as they were, with few exceptions, also king of Sukhothai. After the first fall of Ayutthaya in 1569, Maha Thammaracha crowned his son Naresuan as Uparat and king of Sukhothai/Pitsanulok. Naresuan then had a palace built in front of his Royal Palace, to be his son's place of residence when visiting Ayutthaya - thereby giving rise to the name "Front Palace." In 1583, Naresuan annexed the Sukhothai kingdom to Ayutthaya, and Pitsanulok ceased to be the seat of the Uparat. After his coronation, Naresuan appointed his brother Ekathotsarot to be the Uparat, stating that his brother in the Front Palace had equal status to the King in the Royal Palace.