After two months of speculation and debate, the biggest question of the Eagles' offseason was answered Tuesday when quarterback Sam Bradford agreed to a two-year deal to stay in Philadelphia.

Bradford, 28, will sign a contract worth $36 million, with $26 million guaranteed, according to a league source. There is up to $4 million in additional incentives.

The news broke just minutes after the NFL's 4 p.m. deadline to apply the franchise or transition tags, allowing both sides to reach an agreement that gives Bradford more guaranteed money than either tag would offer but keeps the Eagles from absorbing the major salary-cap hit or other obstacles associated with the tags.

If the Eagles did not reach an agreement with Bradford, he would have been free to negotiate with other teams on Monday and sign with any team next Wednesday.

Bradford will discuss the deal at a Thursday news conference.

Most important for the Eagles, signing Bradford gives Doug Pederson stability and direction at quarterback for his first year as head coach. Even though Pederson was not involved in acquiring Bradford, the team's brass had determined that they wanted him to return. Pederson and executive vice president of football operations Howie Roseman were explicit about that at the scouting combine last week, although it needed to be at a price that worked.

This pact presents a good compromise. The average annual value places Bradford among the top half of the quarterbacks in the league, although it does not come with the years that could burden the team if he again is beset by injury or has a decline in performance. It also allows for more salary-cap flexibility to spend on free agents next week.

A first-round pick by the Rams in 2010, Bradford arrived in Philadelphia last March to mixed opinions. Former coach Chip Kelly surrendered Nick Foles and a 2016 second-round pick to acquire Bradford, who offered a skill set that convinced the Eagles he was worth the gamble. But there was much unknown about how Bradford would play after tearing the same knee ligament in back-to-back years and never recording a winning season. The hope was that the 2008 Heisman Trophy winner could thrive in a new environment - and stay healthy.

After missing much of the offseason program, Bradford finished with 3,725 passing yards with 19 touchdowns and 14 interceptions while completing 65 percent of his passes in 14 games. He missed two games because of a concussion and shoulder injury.

Bradford impressed in two preseason games to help elevate expectations for the 2015 season. He was inconsistent in the first half of the season, throwing for 1,766 yards with nine touchdowns and 10 interceptions while completing 62 percent of his passes during the first seven games. After the bye week, Bradford threw for 1,959 yards with 10 touchdowns and four interceptions while completing 68.2 percent of his passes.

Those last seven games were enough to convince Pederson that Bradford should return this season.

"You can look at it from an X's and O's standpoint," Pederson said. "You can also talk to people that have been around Sam Bradford and understand where he's come as far as his development as a quarterback. The fact that he himself put himself in a leadership role toward the end of the season proves to me that he can handle going forward this role and the opportunity to start."

Bradford also received the support of teammates. Wide receiver Jordan Matthews and tight end Zach Ertz, two of the team's top young skill-position players, were outspoken about their desire for Bradford to return.

"I really want Sam back because I feel he's the guy who can help all of us get to where want to go," Matthews said at the end of the season.

Although Bradford must again learn a new system, he at least has familiarity with some of his teammates. The Eagles wanted to make sure they remained his teammates, which is why they were aggressive to sign Bradford before he hit the open market.

The deal does not preclude the Eagles from adding a young quarterback in the draft. Pederson wants to create a "pipeline" at quarterback, and he's not an advocate of starting a rookie. Pederson cited the apprenticeship that Aaron Rodgers served in Green Bay as an example of the development structure he prefers.

But the first step was ensuring he has a starting quarterback. Pederson suggested if Bradford wanted to play in Philadelphia, then the Eagles would find a way to keep him. The proof was in Tuesday's agreement.