King John faced several problems that upset the barons of England, including quarrels with the Pope over the church, two military defeats in France, and raising taxes to pay for war. In 1215, the barons rebelled and forced King John to agree to the Magna Carta, establishing for the first time that the king would rule according to law and respect the basic rights of the nobility, such as not imprisoning them without cause. The Magna Carta set an important precedent as the first time an English king was made to obey a set of rules limiting his power.