San Francisco's first-team offense that had failed to convert a fourth-quarter touchdown all season finally did so when the 49ers' playoff hopes depended on it.
Carlos Hyde ran for a go-ahead 4-yard touchdown with 2:59 remaining, and San Francisco barely squeaked by the lowly Washington Redskins with a 17-13 win Sunday that kept them in the thick of the playoff chase.
A fourth-down conversion in their own territory away from losing, the Niners finally capitalized with a rare touchdown in the final period on the way to their third straight victory.
San Francisco (7-4) overcame three turnovers.
Washington coach Jay Gruden won a challenge with 5:36 left that Vernon Davis hadn't made a first down. San Francisco went for it and Frank Gore converted the fourth-and-1. On the next play, Colin Kaepernick hit Anquan Boldin for a 29-yard gain and safety Ryan Clark was flagged for a 15-yard unnecessary roughness penalty for his hit on Boldin.
Boldin made a 10-yard reception two plays later, leading to Hyde's score — the first TD by San Francisco's first-team offense in the fourth quarter this season.
Kaepernick threw a 30-yard touchdown pass to Boldin on San Francisco's initial series but did little else offensively to break open what was expected to be a lopsided game. San Francisco was a nine-point favorite in the opening betting line.
Boldin, who caught a pair of touchdown passes in a win at Washington last November, finished with nine catches for 137 yards.
Now, the Niners have a quick turnaround before facing the rival and defending Super Bowl champion Seahawks (7-4) at home Thursday night. Seattle won at home against Arizona on Sunday.
Kai Forbath kicked a 46-yard field goal with 7:42 to go that put Washington ahead. Alfred Morris ran for a season-best 125 yards and a touchdown for the Redskins (3-8), who lost their third in a row and fourth straight to the 49ers.
Gruden didn't appreciate quarterback Robert Griffin III's comments he considered critical of teammates in the wake of a 27-7 loss to Tampa Bay, but everybody seemed to move forward from the franchise turmoil.
These up-and-down 49ers struggled to put away a losing team at home — again. They already lost to St. Louis at new $1.3 billion Levi's Stadium in their last home game, 13-10 on Nov. 2.
Gore fumbled with just more than 10 minutes left and Phillip Thomas recovered to give the Redskins first and 10 at the 49ers' 37.
The Niners seemed to have gained some nice momentum from road wins at New Orleans and at the Giants the past two weeks only to nearly squander it with sloppy play.
Hyde fumbled the first play of the second quarter, forced by Brandon Meriweather and recovered by Ryan Clark. Kaepernick also threw an interception as Washington's Greg Ducre made his first pick midway through the third quarter.
Forbath kicked a tying 27-yard field goal in the final minute of the third quarter. The Redskins got a big break on that scoring drive.
Griffin was sacked and rookie Aaron Lynch was flagged for roughing the passer for a helmet-to-helmet hit. That gave Washington first down on the 49ers' 16 and set up Forbath's tying field goal.
Crabtree caught a 25-yard pass on fourth-and-2 from the 48 to set up Phil Dawson's 41-yard field goal as the first half expired but nothing looked in sync in the second half.
Morris scored on a 1-yard TD run late in the second quarter as the Redskins tied it at 7.
Aldon Smith exploited Washington rookie left tackle Morgan Moses and sacked Griffin III twice. San Francisco had five total sacks after getting six against him in a win last November. Moses started in place of the injured Trent Williams.
More coverage soon on NBCWashington and on News4 at 11.