On the following episode of "SmackDown", Hardy won a fatal four-way elimination match to become the number one contender for Edge's World Heavyweight Championship at Judgment Day, but lost to Edge after Matt interfered and attacked him. Hardy then defeated Edge in a non-title match on the following "SmackDown" to earn the right to choose the stipulation for their rematch at Extreme Rules and chose a ladder match. At Extreme Rules, Hardy won the match to become World Heavyweight Champion for the first time. Immediately after the match, CM Punk cashed in his Money in the Bank briefcase and defeated Hardy to win the championship. He received his rematch against Punk in a triple threat match also involving Edge on the June 15 episode of "Raw", but failed to win. Hardy got another rematch at The Bash, and won the match via disqualification after Punk kicked the ref in the back while feigning an eye injury with Punk still retaining the title. At Night of Champions, however, Hardy defeated Punk to win the championship for the second time. He made his first successful title defense five days later on "SmackDown" by defeating John Morrison. After the match, he was attacked by Punk, who invoked his rematch for the following week, where Hardy retained the championship after interference from Matt Hardy, who was the special guest enforcer. Punk again attacked Hardy post-match, resulting in Teddy Long announcing a Tables, Ladders, and Chairs match between the two for the World Heavyweight Championship at SummerSlam. At SummerSlam, Hardy lost the title back to Punk. On the August 28 episode of "SmackDown", Hardy lost to Punk in a steel cage rematch for the World Heavyweight Championship, resulting in Hardy leaving WWE, in storyline, per the pre-match stipulation. This storyline was put in place to allow Hardy to leave WWE to heal his injuries, including a neck injury. Hardy also had two herniated discs in his lower back and was suffering from restless legs syndrome. Jeff Hardy's contract with WWE expired that week thus ending his 3 year stint with the company.