Mark J. Rebilas-USA TODAY Sports

The Oakland Raiders are betting big on Kelechi Osemele, agreeing to terms with the veteran offensive lineman ahead of the start of free agency. The Raiders confirmed the news on Thursday.

On Wednesday, Aditi Kinkhabwala of NFL.com reported Osemele signed a five-year, $58.5 million deal with $25.4 million guaranteed.

Osemele spent the last four years with the Baltimore Ravens, who drafted him in the second round in the 2012 draft. Baltimore's chances of re-signing Osemele seemed to take a hit when the team slapped the franchise tag on kicker Justin Tucker rather than Osemele.

As ESPN.com's Adam Schefter noted at the time, the 26-year-old was bound to cash in during the offseason, whether it was with the Ravens or another team.

Speaking at the NFL Scouting Combine, Ravens head coach John Harbaugh did his best to try to sway Osemele back to Baltimore, per Jeff Zrebiec of the Baltimore Sun, saying the Ravens offered him an "aggressive" contract:

It's a really aggressive deal. I think it shows a lot of respect for K.O. It shows them that we really want him here and I hope he takes it. I hope he says, "You know what? I know what the Ravens are all about. I know they believed in me. I know what kind of football they want to play and I feel like I'm a part of this thing for a long time like Marshal Yanda's done."

Zrebiec noted the team's approach was "a departure of sorts from the organization's usual free-agent strategy of sitting back and allowing its own unrestricted free agents to test their value on the open market."

Video Play Button OBJ's Trade to Cleveland Has the Browns Hyped Le'Veon's Power Move Pays Off After Signing Massive Deal with Jets Friends to Foes, Ex-UGA Teammates Meet in Super Bowl Cooks Gave a Super Gift to This Rams Employee Mahomes Loves Ketchup as Much as Torching Defenses Bears Hoping to Ride Club Dub to the Super Bowl The Worst Fantasy Football Punishments for Last Place NFL Players Bring Soccer Traditions to the NFL JuJu Is a Man of the People Bills Superfan 'Pancho Billa' Continues to Inspire Happy 26th Birthday to OBJ 🎉 Mahomes Is 'Showtime' Off the Field Too Thielen's Ride from Underdog to Record-Breaking WR Shanahan and His Son Carter Are Hyped for Carter V Browns Winning Off the Field with Community Service Conner's Journey from Beating Cancer to Starting RB Does Donovan McNabb Deserve Your 2019 Pro Football Hall of Fame Vote? B/R Fantasy Expert Matt Camp Gives His Picks for Keep or Release After Week 2 Does Hines Ward Deserve Your 2019 Pro Football Hall of Fame Vote? Shaquem Griffin Starting for Seahawks in Week 1 Right Arrow Icon

Osemele's value skyrocketed after he replaced Eugene Monroe at left tackle. According to Pro Football Focus, he finished as Baltimore's best player at the position.

The difference between offensive guard and offensive tackle is massive in terms of salary. Here's what the top five earners will make at each position, per Spotrac:

Highest-Paid OGs, OTs in 2016 (Total Cash) Rank Guard Tackle 1st Kevin Zeitler, CIN; David DeCastro, PIT ($8,070,000) Trent Williams, WAS ($16,698,750) 2nd ---- Cordy Glenn, BUF ($13,706,000) 3rd Josh Sitton, GB ($6,850,000) Lane Johnson, PHI ($13,112,242) 4th Marshal Yanda, BAL ($6,185,882) Matt Kalil, MIN ($11,096,000) 5th Orlando Franklin, SD ($5,500,000) D'Brickashaw Ferguson, NYJ ($10,375,000) Source: Spotrac

Perhaps sensing he could make a lot more money as a tackle, Osemele said in December he'd prefer to make the change permanent, per Ryan Mink of the Ravens' official website:

"I'd definitely love to be the guy [at left tackle] for the Ravens and into the future as long as I can keep performing at a high level. It's my fourth year in the league now, so I feel like I can handle that responsibility. I'll just keep working at it and I'll get better at it."

The market was favorable for Osemele. Beyond 26-year-old Cordy Glenn—who signed his franchise tender with the Buffalo Bills—and Seattle Seahawks tackle Russell Okung, teams didn't have a ton of options at offensive tackle. As a result, somebody was bound to throw a lot of money at Osemele in the hopes that he can recreate his 2015 performance.

The Raiders' run blocking needed an upgrade after ranking 19th last season, according to Football Outsiders. Exactly where Osemele fits might take a while to determine, though.

John Middlekauff of CSN Bay Area noted one of the team's guards could be forced to switch sides:

Another option is switching Osemele to tackle, as Peter Schrager of Fox Sports explained:

Either way, the Raiders are getting a top-tier run-blocker, per Pro Football Focus:

Along with Donald Penn, fellow offensive linemen Khalif Barnes, Tony Bergstrom and J'Marcus Webb are also on the team's list of potential free agents, per Spotrac, so there's still a bit of shuffling to come during the offseason.

Adding Osemele to the equation is going to plug one of the holes with a reliable option. Locking him up before the market officially opened allowed the Raiders to shift their focus elsewhere before the new league year began Wednesday.

With that said, should the Raiders view Osemele as a tackle, this move is a gamble, considering he hasn't played there for a full season in the NFL. If he fails to provide consistency there, he could shift back inside to guard, ensuring Oakland should get plenty of value over the life of the deal.