SANTA CLARA -- He was young, brash and – some would say – arrogant.

That was the reputation of coach Kyle Shanahan when the 49ers hired him in 2017. In fact, the 49ers’ future general manager just weeks before they officially joined up for the massive rebuild said the exact same thing during a national TV broadcast.

“I want an arrogant coach," then-FOX analyst John Lynch said on an Atlanta Falcons playoff broadcast. "I want a confident coach. I’d be hiring that guy in a second.”

Shanahan went from being the Falcons’ offensive coordinator to the 49ers’ head coach a short time later. He brought Lynch with him to serve as general manager.

Then, they got off to one of the worst imaginable starts with the 49ers. Shanahan, not known for his patience, was tested when the club lost its first nine games in 2017.

“I learned that it was just another thing that I hadn’t gone through,” Shanahan told NBC Sports Bay Area on The 49ers Insider Podcast this week. “When it was over, I learned I could deal with it. It won’t kill you.

“If you’d told me that my first head coaching job was going to start out 0-9, I would’ve asked you, ‘Am I alive still?’ What have I done? I’m sure I’d be freaking out. I didn’t. I handled it.”

The 49ers play the Green Bay Packers on Sunday at 3:40 p.m. in the NFC Championship Game at Levi's Stadium. The winner punches a ticket to Super Bowl LIV in Miami on Sunday, Feb. 2, against the winner of the AFC Championship game featuring the Tennessee Titans and Kansas City Chiefs.

And, now, it is easy to see how the 49ers’ rough beginnings in 2017 played a vital role in the club getting to this spot -- just one victory away from the franchise’s seventh Super Bowl appearance.

“That was cool because you found out a lot about people, going 0-9,” Shanahan said. “It helped me and John make a lot of decisions leading into the next season on certain guys.”

Included in that nine-game losing streak were a record five consecutive losses by three points or fewer. Also, the best any team that started 0-9 had ever finished before that season was 3-13. The 49ers won six games in 2017, including five in a row to finish the season with Jimmy Garoppolo at quarterback.

“It was miserable, but it was necessary,” Shanahan said.

The 49ers had not been to the playoffs since 2013 in Jim Harbaugh’s next-to-last season as coach. But the 49ers did not seem out of place at all on the big stage last week in a 27-10 victory over the Minnesota Vikings in the divisional round of the NFC playoffs.

[RELATED: Dante Pettis awaits next chance to make difference for 49ers]

Shanahan said he believes that all the experiences, beginning in 2017 and continuing with all of the close games the 49ers played this season, have prepared the 49ers for pressure-packed football games.

“We hadn’t been to the playoffs until last week, but I still feel like we’ve been through so much stuff,” Shanahan said. “Losing nine in a row to start [2017], the way our games have gone this year. I feel like every game’s come down to the last play.

“There have been a ton of situations our team has gone through, some good ones and some bad ones, that does kind of harden you and make you a little battle-tested which are very pressure-filled situations and our team has performed in them a lot. That’s what the playoffs are about."

Programming note: NBC Sports Bay Area feeds your hunger for 49ers playoff coverage at 2:30 p.m. Sunday for “49ers Pregame Live,” with Laura Britt, Jeff Garcia, Donte Whitner, Ian Williams and Grant Liffmann previewing the NFC Championship Game against the Packers. That same crew will have all the postgame reaction on “49ers Postgame Live,” starting at approximately 6:30 p.m.