After King John lost an important military battle, the barons pressed their demand. Eventually, King John agreed and on the fifteenth of June 1215 a royal charter was written in legal form and copies were sent all over the kingdom. The main purpose of Magna Carta was to force John to uphold feudal customs, but some of the articles became the basis for modern justice throughout the English speaking world, i.e. the king could not create new taxes without the consent of the barons, the church should operate without royal interference, the king may not sell justice, no freeman may be imprisoned, deprived of property, or exiled except by the lawful judgment of his peers or the established law of the land, etc.
King John died in 1216. His son, Henry III, agreed to abide by Magna Carta, as did subsequent kings. Over time, it became both a sacred trust and a contract between king and people. In the 17th century, Parliament appealed to Magna Carta against the Stuarts, and in different circumstances, Charles I, a Stuart, appealed to it against Parliament.