Udvarhely county consisted of three former seats of the Székelys: Udvarhelyszék, Bardóc and Keresztúr (the latter two as filial seats of the former). It was formed in 1876, when the administrative structure of Transylvania was changed. In 1920, by the Treaty of Trianon, the county became part of Romania until 1940 when, by the Second Vienna Award, much of its territory was reassigned to Hungary. After the end of World War II it became again part of Romania. Most of its territory lies in the present-day Romanian county of Harghita, with small parts in Mureș (a small part in the west) and Covasna (a small part in the south-east).