SANTA CLARA, Calif. -- Anquan Boldin knew it would take one big play by San Francisco's offense, and he delivered it - along with a helmet-cracking hit that left his defender down.
Boldin has been speaking for weeks about this one-game season, and boy did the 49ers need this win against lowly Washington to keep their playoff hopes alive. No matter how they got it done.
Carlos Hyde ran for a go-ahead 4-yard touchdown with 2:59 remaining after Boldin's big gain, and San Francisco barely squeaked by the Redskins with a 17-13 win Sunday that kept them in the thick of the playoff chase.
"We feel like we are in the playoffs," safety Antoine Bethea said. "Win at all costs."
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.
A fourth-down conversion in their own territory away from losing, the Niners finally capitalized with a rare TD 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 Boldin for a 29-yard gain and safety Ryan Clark was flagged for a 15-yard unnecessary roughness penalty for his hit on Boldin.
As the play developed, Boldin just reminded himself "catch the ball and protect yourself."
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.
"For the past couple weeks you've seen guys laying it all out on the line," Boldin said.
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 a season-high 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.
49ers coach Jim Harbaugh planned to get back to work right away preparing.
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 1-yard 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.
"We're not getting any moral victories, nor are we looking for any," Gruden said. "We're all very upset with the outcome of the game, because we had a great opportunity."
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 redeemed himself with the late TD after fumbling the first play of the second quarter. 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 got 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 field goal.
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.
"This team is going to fight. We're going to fight until the end," Kaepernick said.
Notes: Kaepernick threw a TD pass in his 18th straight game, tying the the longest streak by a QB in franchise history with Hall of Famer Steve Young from Oct. 9, 1994-Nov. 26, '95. ... Redskins CB E.J. Biggers left in the first quarter with concussion symptoms, while LB Adam Hayward left with a right knee injury and CB Tracy Porter with a hurt right shoulder. ... Moses started in place of the injured Trent Williams.
Copyright 2014 by The Associated Press
Relive Anquan Boldin's performance against the Redskins with Game Rewind