PITTSBURGH — Alex Smith felt the rush and quickly unloaded, sending a dart to his tight end, who stood with barely a defender in sight. Logan Thomas, the quarterback turned red-zone weapon, reeled in the 15-yard spiral, then spun around as teammates engulfed him in celebration.

Smith watched it all from his back after getting pummeled by a pair of Pittsburgh Steelers defenders — with a titanium rod in one leg that was gruesomely broken more than two years ago, a bloody sock around the other that was gashed earlier Monday evening.

Smith wasn’t done writing the closing chapter of a 23-17 win at Heinz Field, an unthinkable result for the Washington Football Team against an unbeaten Steelers squad that entered the night with a firm grasp on the No. 1 seed in the AFC.

Smith led his team to the go-ahead and game-padding field goals by Dustin Hopkins, a pair of 45-yarders that secured a victory that moved Washington to 5-7, firmly entrenched in the race for the NFC East crown.

“I told them it was well earned. We talked about it,” Coach Ron Rivera said. “Again, the biggest thing is your reputation, your record — when you get on the field, those things don’t matter. What matters is who plays the best, and I thought our guys played pretty doggone good today.”

The victory was Washington’s first against the Steelers since Nov. 17, 1991, and, according to NFL Research, marked the first time a team with a record as poor as Washington’s coming in (4-7) defeated a team that was 11-0 or better.

More significant: Washington remained tied with New York at 5-7 in the NFC East, though the Giants own the tiebreaker by virtue of their two wins over Washington. The win improved Washington’s chances of earning a playoff berth to 34 percent, according to analytics used by ESPN.

Rivera described the mood of his team’s locker room afterward as “euphoria.” Anything less would be unfitting after Washington snapped the Steelers’ winning streak behind the leadership of its 36-year-old quarterback and a menacing defensive line. The win was more than a statement, more than an upset for a young team many counted out. For a franchise embroiled in losing and disappointment for the better part of two decades, the victory felt like a cultural shift finally beginning to take hold.

But in true Washington fashion, the start to the game was simply disastrous, marred by penalties, missed opportunities and missed tackles. In the first half, Washington had only six first downs, was 0 for 8 on third-down conversions and had twice as many penalty yards (30) as rushing yards (15). Making matters worse: Washington’s up-and-coming rookie running back, Antonio Gibson, suffered a toe injury early in the first quarter and didn’t return, while its leading receiver, Terry McLaurin, was limited to only two catches for 14 yards.

Washington was unable to muster much production in the early going, and its defense appeared overmatched. Steelers quarterback Ben Roethlisberger averaged only 2.28 seconds to throw the ball in his first 11 starts of the season, relying primarily on short passes and slants to spread the ball to Pittsburgh’s various playmakers. But against Washington, he found big plays early, including a 50-yard touchdown pass to James Washington, who slipped through the grasp of cornerback Kendall Fuller and safety ­Deshazor Everett en route to the end zone in the second quarter — Pittsburgh’s second touchdown of that period.

Washington’s defense continued to make its presence felt. Rookie pass rusher Chase Young thwarted one potential touchdown by snuffing out a screen and forcing Roethlisberger to hold on to the ball long enough to draw a penalty on Pittsburgh (tackle Alejandro Villanueva was flagged as an ineligible receiver), then stopped another by whipping around the edge on a Steelers fourth-and-goal opportunity to complete a goal-line stand.

Washington’s offense started to come alive late in the first half, when Smith connected with Cam Sims for a 30-yard completion to help set up a 49-yard field goal — despite taking back-to-back sacks to stall the drive.

Smith created a scare, for those who noticed, when his lower left leg — his “good” leg — was gashed by the cleat of his left guard, Wes Schweitzer. Blood soaked through Smith’s sock and dripped over his cleats, prompting a team trainer to sprint onto the field, furiously wrap the leg with black tape, wipe clean Smith’s once-white cleats and sprint back off the field.

“First of all, this is a heck of a defense we played today,” Rivera said. “[Smith] was patient and he took what they were giving us, and that was probably the biggest thing.”

Smith, unfazed by the blood, walked back to the huddle to continue onward. He guided Washington to a 14-play, 82-yard drive that set the tone for the second half.

After two penalties to start, Sims kept the drive alive with another big play, this one for 31 yards on a third and 14, then Steven Sims Jr. pulled in a nine-yard catch on another third and long before Smith aired it out for a 30-yard, over-the-shoulder catch by Thomas.

Thomas was brought down at the 1, and though Washington pushed it all the way to fourth down to try to get in the end zone, it was gifted with a penalty on Pittsburgh to get a new set of downs and another chance. Peyton Barber punched it in with a run up the middle.

Smith and Thomas connected in the fourth quarter for the tying score, and Hopkins then provided the difference, converting twice in the final 2:04.

Yet it was Washington’s defense that may have made the loudest statement, outplaying a Pittsburgh defensive unit that led the league in nearly every major category. Pittsburgh had only 115 yards of offense in the second half and only 21 rushing yards in the game, the second fewest by any team this season. And although Washington’s bevy of pass rushers couldn’t make it through for a sack, they totaled four batted passes, none bigger than Montez Sweat’s that led to Jon Bostic’s game-sealing interception of Roethlisberger just before the two-minute warning.

“We’ve been down for such a long time, and we’re trying to rebuild ourselves and build up,” Rivera said. “This is something that we can build off of, and I was really proud of the way they played.”

Smith finished 31 for 46 for 296 yards, one touchdown and a 92.3 passer rating.

His team finished on a high, with a celebratory locker room and his teammates trusting him.

“I love me some [number] 11,” Young said.