Shanahan opens special section of his play book in 49ers win

Typically, Kyle Shanahan would have ran the ball out of frustration.

Typically, Kyle Shanahan would have ran the ball out of frustration.

But faced with a pair of 3rd-and-16’s in the 49ers final drive of the game against the Los Angeles Rams, however, Shanahan opened a special section of his play book.

The two pass plays Shanahan called — the first to wide receiver Kendrick Bourne near San Francisco’s own 37-yard line and the second deep down field to Emmanuel Sanders — paid off, defining the 49ers night on Saturday.

With a game-winning field goal from kicker Robbie Gould as time expired at Levi’s Stadium, the 49ers edged the Rams, 34-31, eliminating Los Angeles from playoff contention. As for San Francisco, the win now sets up an ultimate showdown with the Seattle Seahawks next weekend which will decide the NFC West and the No. 1 seed in the NFC playoff picture.

“3rd-and-16 is not the best situation to be in. Usually you’re not feeling good,” Shanahan said. “That game for everyone wasn’t perfect… But each individual kept coming back and to find a way to end the game there like that was pretty special.”

Still cognizant of a Week 6 beatdown in which the 49ers handled the Rams 20-7 at the L.A. Coliseum, Los Angeles opened the game with looking to move the pocket and get Rams quarterback Jared Goff away from the 49ers pass rush.

San Francisco had registered four sacks and held Goff to a season-low 78 passing yards in that game thanks to its pulverizing effort up front.

With a series of boot-leg and play-action pass sets, the Rams were able to exploit a short-handed 49ers secondary that played was forced to play without safety Jaquiski Tartt, who had missed the last two weeks with fractured ribs.

“Teams are going to game-plan against us,” said 49ers defensive lineman DeForest Buckner. “They didn’t want him to get hit. The first game we pretty much tee’d off on him… They needed to find ways to get him out of the pocket.”

Also limited was cornerback Richard Sherman, who had missed last week’s 29-22 loss to the Atlanta Falcons with a grade-two hamstring injury.

Head coach Sean McVay, who led the Rams to a Super Bowl appearance just last year, orchestrated a trio of drives in the first half that ended in touchdowns, heavily relying on Goff’s arm.

On these drives, Goff completed 12 of his 14 pass attempts for 162 yards and one touchdown to wide receiver Robert Woods.

Throughout the majority of this time, the 49ers offense looked lethargic, unable to keep up with Los Angeles’ pace. It wasn’t until San Francisco’s fourth possession, after quarterback Jimmy Garoppolo threw his first of two interceptions of the day that San Francisco’s offense snapped out of its funk.

Using wide receiver Deebo Samuel, who picked up 46 of the 75 yards on the drive, the 49ers marched down field in five plays. They capped off the possession with a 19-yard jet sweep from Samuel, who tip-toed in for a touchdown.

With a 16-yard touchdown run from running back Raheem Mostert on the next possession, San Francisco was down 21-17 as the Rams snapped the ball at the 49ers 48-yard line.

Reading the play like a book, 49ers linebacker Fred Warner followed Goff’s eyes as he dropped back, appearing to look for a deep pass. Instead, he swung the ball to running back Malcom Brown in the flat as Warner closed in, jumping the route without hesitation.

46 yards later, Warner had given the 49ers their first lead of the game heading into halftime up 24-21.

“We knew that we had to make a big play to get us going,” Warner said. “We talked about it for weeks that we needed to attack the ball if we wanted to give our team a chance to win. It was great timing.”

Coming out of halftime, however, the 49ers offense continued to struggle. On top of Garoppolo throwing his second pick of the game on the half’s opening drive, the 49ers gained just 23 yards in the third quarter.

To make matters worse, the Rams took the lead once again as they drove 68 yards in seven plays. Goff threw his second touchdown pass of the night as he hit wide receiver Cooper Kupp from 22 yards out.

San Francisco answered in the fourth quarter, however, as Garoppolo found tight end George Kittle by extending the play with his legs on third down. As Kittle ran to the goal line, Garoppolo fired a dart his way, getting into the end zone and re-taking the lead, 31-28 with 6:06 to play.

The Rams, still trying to keep their own playoff hopes alive, tied the game three-and-a-half minutes later with a 52-yard field goal from kicker Greg Zuerlein, giving Shanahan and Garoppolo the ball back before the two-minute warning.

Their drive got off to a horrible start, though, as Garoppolo took his fifth sack of the game on first down. Staring at 3rd-and-16 a play later, Garoppolo found Boure on a deep slant, which moved the chains for San Francisco.

Two more plays later, after Garoppolo had taken his sixth sack of the day, he found a sliver of daylight to heave a pass down field to a streaking Sanders. Although his arm was hit, Garoppolo found Sanders, who rolled inside of the Rams’ 30-yard line.

“It’s the exact situation we were looking for,” Garoppolo joked. “To convert two of those the way we did, it was incredible. Just a lot of good execution and guys blocking up front the way they needed to.”

After a few more yards, the 49ers were at Los Angeles’ 15-yard line, setting up a chip-shot field goal for Gould, who easily split the uprights to send the 49ers off in walk-off fashion.

With the win, the 49ers will have a chance to earn the No. 1 seed in the NFC playoffs, which comes with a first-round bye and home field advantage — a luxury for a 49ers team so beat up.

“At the end of the day, we have Seattle coming up,” Sanders said. “We have to go out there and handle business. Now it means more. Obviously we had to beat the Rams for that game to even matter. Now that we beat the Rams, it’s going to be a big-time game for us.”

NBA fines Mavericks for bad behavior against the Warriors

What Golden State players, coaches and Dallas owner Mark Cuban had to say

Warriors roar back to win behind a Looney performance

Golden State takes 2-0 lead against Dallas in Western Conference Finals

Giants catchers work in Posey’s shadow

Joey Bart, heir apparent to Buster’s throne, ceding more at-bats to supposed backup Curt Casali