With the 31st overall pick in the 2017 NFL Draft, the San Francisco 49ers selected linebacker Reuben Foster out of Alabama. The 49ers had to trade back into the first round to make the pick happen. 

San Francisco moved into the 31st spot by trading with the Seahawks, who just landed in that spot by trading with the Falcons. If that sounds confusing, the Seahawks were originally picking 26th, but then they traded down to the 31st pick. Now, they've traded that pick to the 49ers. 

To move up to 31, the 49ers sent a 2017 second-round pick and a 2017 fourth-round pick to the Seahawks. 

San Francisco 49ers

Pete Prisco's Grade: A

CBSSports.com senior NFL writer Pete Prisco is a big fan of the 49ers' pick. 

"He has a Ray Lewis-type of game. Love this pick. Top-10 talent."

Instant analysis 

For the 49ers, this pick is a steal because they didn't think there was any way Foster would still be available this late in the draft. The reason Foster fell so far is because he was dealing with several issues that seemed to scare off dozens of teams during the first round of the draft on Thursday.   

There were a few red flags on Foster leading up to the NFL Draft, but apparently, that didn't scare off the 49ers. In the months leading up to the draft, Foster had surgery on his shoulder, was kicked out of the NFL combine and also failed a drug test after one of his urine samples was reported as diluted. As long as Foster is able to put these issues behind him, he could be a force on San Francisco defense for years to come, which is good news for the 49ers because they definitely need a force on their defense, a unit that ranked dead last in the NFL in 2016.  

Fantasy impact

"Great move by the 49ers to trade back into the first round and get Reuben Foster. Along with Solomon Thomas, this 49ers DST is looking better. Keep an eye on them as a waiver wire addition during the season." -- Jamey Eisenberg

NFL comparison

Patrick Willis: Willis did it at a higher level for longer at Mississippi but he did not have to wait his turn like Foster at Alabama, who was left to star in a supporting role on defense and special teams early. Foster's sheer explosiveness made him an undeniable force for the Tide. If able to remain healthy--- a legitimate concern given the mighty collisions he creates -- Foster projects as a future Pro Bowler.