Thirteen years after he started his NFL career in Minnesota as an undrafted rookie, Shaun Hill has returned to the Vikings as a veteran mentor.

The Vikings finalized a two-year contract Wednesday with Hill, securing their backup for Teddy Bridgewater and bringing the veteran to his original team.

The Vikings also re-signed defensive tackle Tom Johnson and announced agreements on new deals with two of their other unrestricted free agents, offensive lineman Joe Berger and long snapper Cullen Loeffler.

Hill's contract is worth as much as $6.5 million, including $3.2 million guaranteed this season. His hit to the salary cap is $1.5 million less than Matt Cassel's, and the Vikings netted an extra third-day draft pick for him in their trade with Buffalo.

Undrafted out of Maryland in 2002, Hill was a third-stringer for the Vikings until going to San Francisco in 2006. His first of four seasons with the 49ers was under offensive coordinator Norv Turner, now in the same role with Minnesota.

"He stood on the table to get me there. He really played a big part in continuing my career. I obviously learned a lot from him in that one year," Hill said.

Hill then moved on to Detroit, where 10 of his 34 career starts came in 2010 after Matthew Stafford was hurt in the opener. Hill had a 335-yard game against Philadelphia the following week, his career high.

After four years with the Lions, Hill landed with St. Louis last season. He started eight games after the injury to Sam Bradford, completing 63.3 percent of his passes for 1,657 yards, eight touchdowns and seven interceptions. He started the opener against the Vikings, going 8 for 13 for 81 yards until getting hurt.

Unlike last year, when Bridgewater was brought along slowly and Cassel was given the job out of training camp, only relinquishing it when he got hurt, there will be no mystery about the starter this time.

"It's better to have our established roles. I understand that. And I'll be able to fit that role for sure," said Hill, who credited offensive coordinator Scott Linehan (2002-04) and quarterback Brad Johnson (2005) for his development during his first tenure with the Vikings.

Since then, Hill has helped guide other younger players such as Stafford and Alex Smith. Bridgewater, who has already been in contact with Hill to welcome him, will be the next in line, whether that's film study during the week or strategy on game days.

"Just being another set of eyes on the sidelines for him, being able to tell him what I saw or being able to stick up for him to a coach who might be riding him pretty hard about something," Hill said.

"I could say, 'Look, I saw the same thing. I would've done the exact same thing.' So there's a lot of aspects to it, and I'm familiar with all of them and really looking forward to working with him."

Johnson was second on the team with a career-high 6 1/2 sacks, playing on a rotational basis behind starters Sharrif Floyd and Linval Joseph. His three-year contract is worth as much as $7 million, including $3 million guaranteed.

Undrafted out of Southern Mississippi in 2006, Johnson played in the NFL's European developmental league, the Arena Football League and the Canadian Football League before landing with the New Orleans Saints in 2011. He joined the Vikings last season.

Johnson was arrested Oct. 5 outside a Minneapolis restaurant on misdemeanor trespassing, disorderly conduct and obstruction charges his representatives said should be dismissed. The case is scheduled for jury trial starting March 30.

Loeffler has the longest tenure on the team since signing as an undrafted rookie in 2004.

Berger has been a valuable backup at the three interior positions and a special teams contributor since joining the Vikings in 2011. This is the fourth contract he has signed with the club. Last year, he started the last nine games at right guard after the injury to Brandon Fusco. Berger's two-year contract is worth more than $2 million, though only $130,000 was guaranteed.

Based on ages of players on active rosters in the last game of the 2014 season, the Vikings were the third-youngest team in the NFL last year at an average age of 26 years and 66 days, according to STATS research. Jacksonville and St. Louis were the only teams with a younger average.

Though they're all role players and not part of the core, the signings of Hill (35), Loeffler (34), Berger (32) and Johnson (30) won't help that average.

___

AP NFL websites: www.pro32.ap.org and www.twitter.com/AP_NFL