IRVING, Texas -- To clear salary-cap space and lock up their franchise quarterback, the Dallas Cowboys and Tony Romo reached an agreement on a blockbuster six-year extension worth $108 million, making him the highest paid player in franchise history.

In the first year of the extension, Romo will make $26.5 million, and after two years, he will make $40 million. Romo's money over the first three years -- with the likelihood that Dallas keeps him the next three seasons -- will be $57 million.

All told, Romo now has a seven-year deal worth $119.5 million, of which $11.5 million was included as part of a $25 million signing bonus spread over the course of the deal. The $11.5 million is what Romo was set to make in 2013 before the extension.

"In today's game, every NFL franchise understands the importance of production and continuity at the quarterback position, and, historically, few franchises have enjoyed those benefits more than the Dallas Cowboys," Cowboys owner and general manager Jerry Jones said in a statement. "We are very confident in this investment and commitment."

Romo's salary-cap number was $16.8 million in the final year of his current deal, but he now will count $11.8 million against it, saving the Cowboys $5 million. His average salary for six more years will be $18 million. For 2013, Romo receives a base salary of $1.5 million.

Most importantly for Romo, he receives more guaranteed money than the six-year, $120.6 million contract that Joe Flacco recently signed with Baltimore. Romo will receive $55 million guaranteed from the Cowboys, $3 million more than Flacco got from the Ravens.

"I am excited about the year ahead and some of the changes that we have made to allow us to be a better team going forward," Romo said in a statement. "This is an organization that always gives us a chance to win, and that is always the main focus here. We haven't had the type of success that we have all wanted the last few years, but I do know that we are on the verge of doing that.

"I have been around good teams and bad teams and our team is about to take that next step with a lot of things that are taking shape around Valley Ranch. Today just further instills that and I am excited about our team and the direction we are headed."