Quarterback Colin Kaepernick signed a six-year contract extension with the San Francisco 49ers on Wednesday. He is now signed through 2020.

The deal is worth up to $126 million with a record $61 million guaranteed. The $61 million guaranteed passes Drew Brees’ 2012 deal with the New Orleans Saints that had $60.5 million guaranteed, for the most guaranteed money in NFL history. Kaepernick was set to make $1.073 million this season, and now he is among the ten highest-paid quarterbacks in the NFL, according to ESPN, which first reported the news.

"Colin's hard work and dedication have played an integral role in the recent success of the 49ers organization," 49ers general manager Trent Baalke said in a statement. "His work ethic, leadership and on-field production have positively influenced our team, and we look forward to his continued growth in all areas."

Kaepernick, a second-round draft pick in 2011, took over for Alex Smith as the 49ers starting quarterback midway through the 2011 season. In three seasons in the NFL, he has a 21-8 overall record, including the playoffs, and has passed for 5,046 yards and 31 touchdowns with 11 interceptions, according to USA Today. As a runner he has 937 yards and nine scores. He has made it to consecutive NFC Championship games and led the 49ers to their first Super Bowl in 18 years in 2012.

Kaepernick’s contract talks were delayed because of an investigation of an incident at a hotel in Miami that he was a part of. He hopes that the investigation will be over soon.