By Dean Michaels, NFL Writer

Versatile tight end Aaron Hernandez has agreed to a five-year contract extension with the New England Patriots reportedly worth $40 million, including a $12.5 million signing bonus.

The contract is expected to be signed in the next 24 hours. The Patriots now have both of their young tight ends locked up to long-term deals. All-Pro Rob Gronkowski recently agreed to a six-year, $53 million extension, the richest contract for a tight end in NFL history.

Hernandez has donated $50,000 to the Patriots Charitable Foundation in honor of Myra Kraft, to thank Robert Kraft for his faith in drafting him and extending the deal.

"Any contract that we agree to is one that we're in support of," coach Bill Belichick said when asked about the contract. "If we agree to a contract on a player, then we're in support of that player, the length of the contract, the amount that we're paying him, and all the other things that go with the contract."

"We wouldn't do it if we weren't in support of it, as an organization, me personally, all of the above. Again, we wouldn't have done it if we weren't happy with it. Glad it worked out," added Belichick, who praised Hernandez's improvement and versatility.

"Aaron has improved a lot," Belichick said. "He's worked hard, he's improved a lot in all phases of the game: passing game, running game, protection and his overall versatility. He's done a good job for us."

The 22-year-old Hernandez is entering his third NFL season. He caught 79 passes for 910 yards last season, third on the team behind Gronkowski's 1,327 and Wes Welker's 1,569.

Hernandez averaged 11.5 yards per reception with seven touchdowns in 2011, where his offensive role expanded to include aligning as a running back. He finished with eight carries for 70 yards during the Patriots' playoff run to Super Bowl XLVI.

This preseason, Hernandez has even fielded punts for the team, returning one punt for five yards in the team's recent 30-28 loss to the Buccaneers.

A fourth-round draft pick out of the University of Florida in 2010, Hernandez has started 19 of 28 games over his first two seasons and has 124 receptions for 1,473 yards and 13 touchdowns with eight rushing attempts for 92 yards.

Hernandez's contract extension could affect the Patriots' plan to sign Welker to a long-term deal. Welker signed a $9.5 million franchise tender in May after he failed to receive a long-term offer from the Patriots.

"It's good for him. I'm definitely happy for him," Welker said of Hernandez's deal. "He's a great player and done a lot of great things for us. Good to have him here."

Should the Patriots choose to franchise Welker again this offseason, his salary would increase to $11.4 million for the 2013 season.

Patriots Tight End Aaron Hernandez Agrees to Five-Year Extension