Edward had a close and controversial relationship with Piers Gaveston, who had joined his household in 1300. The precise nature of his and Gaveston's relationship is uncertain; they may have been friends, lovers or sworn brothers. Gaveston's arrogance and power as Edward's favourite provoked discontent among both the barons and the French royal family, and Edward was forced to exile him. On Gaveston's return, the barons pressured the king into agreeing to wide-ranging reforms, called the Ordinances of 1311. The newly empowered barons banished Gaveston, to which Edward responded by revoking the reforms and recalling his favourite. Led by Edward's cousin, the Earl of Lancaster, a group of the barons seized and executed Gaveston in 1312, beginning several years of armed confrontation. English forces were pushed back in Scotland, where Edward was decisively defeated by Robert the Bruce at the Battle of Bannockburn in 1314. Widespread famine followed, and criticism of the king's reign mounted.
The Despenser family, in particular Hugh Despenser the Younger, became close friends and advisers to Edward, but Lancaster and many of the barons seized the Despensers' lands in 1321, and forced the King to exile them. In response, Edward led a short military campaign, capturing and executing Lancaster. Edward and the Despensers strengthened their grip on power, formally revoking the 1311 reforms, executing their enemies and confiscating estates. Unable to make progress in Scotland, Edward finally signed a truce with Robert. Opposition to the regime grew, and when Isabella was sent to France to negotiate a peace treaty in 1325, she turned against Edward and refused to return. Instead, she allied herself with the exiled Roger Mortimer, and invaded England with a small army in 1326. Edward's regime collapsed and he fled to Wales, where he was captured in November. The king was forced to relinquish his crown in January 1327 in favour of his 14-year-old son, Edward III, and he died in Berkeley Castle on 21 September, probably murdered on the orders of the new regime.
Edward's relationship with Gaveston inspired Christopher Marlowe's 1592 play Edward II, along with other plays, films, novels and media. Many of these have focused on the possible sexual relationship between the two men. Edward's contemporaries criticised his performance as king, noting his failures in Scotland and the oppressive regime of his later years, although 19th-century academics later argued that the growth of parliamentary institutions during his reign was a positive development for England over the longer term. Debate has continued into the 21st century as to whether Edward was a lazy and incompetent king, or simply a reluctant and ultimately unsuccessful ruler.
Despite Edward I's successes, when he died in 1307 he left a range of challenges for his son to resolve. One of the most critical was the problem of English rule in Scotland, where Edward's long but ultimately inconclusive military campaign was ongoing when he died. Edward's control of Gascony created tension with the French kings. They insisted that the English kings give homage to them for the lands; the English kings saw this demand as insulting to their honour, and the issue remained unresolved. Edward I also faced increasing opposition from his barons over the taxation and requisitions required to resource his wars, and left his son debts of around £200,000 on his death.[nb 1]