The United Kingdom is an unusual example of a nation state due to its claimed "countries within a country" status. The United Kingdom, which is formed by the union of England, Scotland, Wales and Northern Ireland, is a unitary state formed initially by the merger of two independent kingdoms, the Kingdom of England (which already included Wales) and the Kingdom of Scotland, but the Treaty of Union (1707) that set out the agreed terms has ensured the continuation of distinct features of each state, including separate legal systems and separate national churches.