Prior to the 19th century, all education in Madagascar was informal and typically served to teach practical skills as well as social and cultural values, including respect for ancestors and elders. The first formal European-style school was established in 1818 at Toamasina by members of the London Missionary Society (LMS). The LMS was invited by King Radama I to expand its schools throughout Imerina to teach basic literacy and numeracy to aristocratic children. The schools were closed by Ranavalona I in 1835, but reopened and expanded in the decades after her death.