Though they did win four Super Bowls in the 1980s while becoming the Team of the Decade, the 49ers and Hall of Fame coach Bill Walsh suffered several crushing defeats during the decade that included a last-minute loss to the Redskins in the 1983 NFC Championship Game and a 49-3 loss to eventual Super Bowl champion Giants in the divisional round of the 1986 playoffs. 

But those losses, as bad as they were, paled in comparison to the 49ers' stunning loss to the Vikings in the divisional round of the 1987 playoffs, a loss Walsh years later called the worst of his career. 

After going 13-2 in the strike-shortened regular season, the 49ers fell to the Vikings, 36-24, despite being 11-point favorites entering the game. Simply put, San Francisco's defense, a unit that was first in the NFL in passing and rushing defense during the regular season, could not find a way to stop Vikings receiver Anthony Carter, who torched the 49ers for a then playoff record 227 receiving yards on 10 catches. Carter's stats dwarfed that of future Hall of Fame receiver Jerry Rice, who caught just one pass for 16 yards after catching 22 touchdown passes during the regular season. 

"Anthony Carter's a great player," then Vikings head coach Jerry Burns told NBC Sports after the game. "Obviously, he was stunned by the comparison all the time with Jerry Rice. I have nothing but accolades for Rice, he's a great football player, but so is Anthony Carter."

"We came out against Minnesota, and Anthony Carter just goes berserk," former 49ers lineman Harris Barton recalled in an NFL Films documentary on the 1988 49ers. "I don't even remember who the quarterback was, but every time I looked up at the big screen to see what the replay was, Anthony Carter was making some kind of circus catch."

The Vikings' quarterback that day was Wade Wilson, who threw for nearly 300 yards and two touchdowns against the 49ers' formidable defense. Wilson's first touchdown pass, a seven-yard strike to Carl Hilton, helped the Vikings build a 13-3 second quarter lead. His second touchdown, which came after a pick-six of 49ers quarterback Joe Montana by Vikings defensive back Najee Mustafaa, gave Minnesota a seemingly insurmountable 27-10 lead midway through the third quarter. 

In a move that shocked seemingly everyone that was packed inside rain slogged Candlestick Park, Walsh decided to pull Montana after the pick-six in favor of Steve Young. Young, who was traded from Tampa Bay to San Francisco before the start of the '87 season, quickly led the 49ers on a pair of scoring drives that cut the deficit to nine points minutes into the fourth quarter. While Young wasn't the passer Montana was (at that particular point in time), his athleticism and ability to extend plays with his legs helped get the 49ers back in the game. 

"He's great," former Vikings safety Joey Browner said of Young after the game. "He's something else. We had to dig down deep to in order to keep him contained, because he was running us to death." 

Montana endured arguably the worst performance of his postseason career (going 12 of 26 passing for 109 yards with no touchdowns and his pick-six), while Young showed glimpses of the Hall of Fame quarterback he would eventually become, going 12 of 17 for 158 yards and a score while also rushing for 72 yards and a touchdown on just six carries. 

"Young started running around, and we wanted to contain him," Burns said after the game. "We didn't think that he was as good of a passer or as knowledgeable in their offense as Montana, but they're both good quarterbacks."

Young's performance gave the 49ers hope, but San Francisco's defense never found a way to stop Carter, whose continued brilliance in the second half set up three field goals by Jeff Nelson that included his 23-yard field goal that proved the be the final score in Minnesota's 12-point victory. After the win, Burns laid out how the Vikings were able to contain Montana and the 49ers' offense. 

"We laid it on our defensive line," said Burns, whose game plan was similar to the ones defenses would use decades later to try to contain Tom Brady, who grew up a diehard Montana and 49ers fan. "Jerry Rice is a great receiver, but the way to stop a great receiver is to stop the quarterback. And we felt that if we could pressure and contain Montana, we could stop their passing game. And they did that job."

Despite being a two-time Super Bowl winning coach, Walsh knew that his time in San Francisco could have been numbered following the loss to the Vikings. After the loss, many in the media were also proclaiming that the 49ers' reign atop the NFL had come to an end. 

"The playoff loss to the Vikings in '87 was probably my most traumatic experience I've had in sports," Walsh told NFL Films years later. "Coming off the field, I was so embarrassed, so hurt, so humiliated. Our owner (Eddie DeBartolo Jr.) was beside himself, very, very angry, and hurt. In private conversations, Eddie was so frustrated, that he probably stated to other people that he'd like to fire me."

While the loss ultimately didn't cost him his job, it did convince Walsh that the upcoming 1988 season could be his last. 

"It was traumatic," Walsh said. "It had repercussions throughout our organization for months to come."

The contrasting performances Montana and Young that day sparked a quarterback controversy that was not resolved until 11 games into the 1988 season. After playing musical chairs with his quarterbacks up until that point, Walsh decided to stick with the 32-year-old Montana after watching his team suffer consecutive mid-season losses to the Cardinals and Raiders.  

The 49ers, 6-5 and on the verge of missing the playoffs, received a passionate speech from safety Ronnie Lott during a "players only" meeting. The meeting proved to be the turning point in not only the '88 season, but in the legacy of the 49ers' dynasty. San Francisco would go on to win four of their final five games to clinch the NFC West division title and a playoff rematch against the Vikings. 

A year removed from the worst loss in franchise history, the 49ers whiplashed the Vikings in the rematch, with Montana throwing three first half touchdown passes to Rice in San Francisco's 34-9 victory. 

After exercising some demons, an inspired Montana surprised his teammates by giving a rare postgame speech. 

"Joe Montana very seldom gave motivational talks after the game," said former 49ers running back Roger Craig. "The room was so quiet, you could hear a pin drop."

What did Montana say to his teammates? 

"The teams that have beaten another team by a big margin have come back the next week and played terrible, and that is not gonna happen to this ball club. We've opened the door, we're gonna through it next week, and we're gonna kick [expletive] and take no prisoners the week after." 

The 49ers certainly did, defeating the Bears in Chicago the following week before rallying from behind to defeat the Bengals in Super Bowl XXIII. A year after his worst loss as the 49ers' coach, Walsh ultimately got his wish, retiring as a Super Bowl champion following the 1988 season. 

"1988 established the 49ers as a dynasty, and it came the hard way," said Walsh, who passed away in 2007. "We salvaged a struggling season to make it a championship season. Super Bowl XXIII means an awful lot to me."