The city of Oslo was established as a municipality on 3 January 1838 (see formannskapsdistrikt). It was separated from the county of Akershus to become a county of its own in 1842. The rural municipality of Aker was merged with Oslo on 1 January 1948 (and simultaneously transferred from Akershus county to Oslo county). Furthermore, Oslo shares several important functions with Akershus county.