Editor's note: The above video is from Nov. 8, 2015.

Tight end Garrett Celek, coming off the best season of his four-year career, cashed on on Tuesday with a contract extension from the 49ers two weeks before he was scheduled to become an unrestricted free agent.

The 49ers and Celek agreed on a four-year contract, the 49ers announced. The NFL Network reports the deal with worth $14 million and includes nearly $5 million in guaranteed money.

"Since Garrett entered the league as an undrafted rookie free agent in 2012, he has displayed the skill, work ethic and desire to compete at a high level in the National Football League,” 49ers general manager Trent Baalke said in a statement

“His commitment and determination to succeed are reflected in the way he conducts himself as a professional on and off the field. As an organization, we would like to congratulate Garrett and look forward to his continued development as a member of this organization.”

Celek, 27, appeared in 11 games last season with eight starts and caught a career-high 19 passes for 186 yards and three touchdowns. He ended the season on injured reserve with a high-ankle sprain.

Celek entered the NFL in 2012 as an undrafted rookie from Michigan State. After appearing in 25 games his first two seasons, Celek was limited to just three games in 2014 after opening the season on the physically-unable-to-perform list with a back injury. In 39 career games, Celek has 27 catches for 328 yards and three touchdowns.

Vance McDonald, Blake Bell and Busta Anderson are the other tight ends on the 49ers' offseason roster.

 

Celek's older brother, Brent, played three seasons under Chip Kelly with the Philadelphia Eagles. Brent Celek, a nine-year pro, had 17 receptions for 398 yards and three touchdowns last season. His most productive season under Kelly was 2013, when he caught 32 passes for 502 yards and six touchdowns.