The morning of October 30, 2017, didn't start so well for San Francisco 49ers head coach Kyle Shanahan. It did, however, end better.

The 49ers had just lost their eighth-straight game to fall to 0-8 on the season. They were coming off of an ugly 33-10 defeat to the Philadelphia Eagles. Then-safety Jimmie Ward broke his forearm in the game and was headed toward injured reserve. The 49ers' leading receiver, Pierre Garçon, went down with a neck injury and it was later revealed that he too would be lost for the season.

During the losing stretch, the 49ers lost an NFL-record five games by three-or-fewer points and it did not seem like the losing was ever going to end. Shanahan needed to catch a break in what was seeming like a disastrous inaugural season for the 49ers' new regime.

It got one that day.

Shanahan joined KNBR this week (interview aired Tuesday morning) and reflected on the day that the New England Patriots came calling and offered up quarterback Jimmy Garoppolo.

"I remember how miserable I was coming in that morning," Shanahan said on the Murph & Mac show. "It was after the Philadelphia game where we were kind of at rock bottom there. We went into that game pretty banged up, lost guys during that game, so it made you worry about the next week too coming in that morning. Our defense played well that game, and it was just one of the worst games I had been a part of offensively.

"So I had a horrible taste coming in. I had to address a bunch of things with the team and went through a real tough day. I did have that phone call in the morning, which surprised me, and it changed my mood a little bit. It excited me, but there was still a lot of other stuff going on. I had to go address the team and deal with a bunch of things.

"But I remember, at the end of the day, sitting in bed with my wife and I was just like, 'Gosh, that was miserable this morning, but it's weird that tonight, we're going to bed and we do have Jimmy as our quarterback so let's see how this goes.'

"It was two extremes in the day, that was for sure."

Shanahan still wasn't convinced that Garoppolo would be the long-term solution for the 49ers even after the team parted with a second-round draft pick to acquire him. The quarterback still had to prove himself to his new head coach. Shanahan was convinced after Garoppolo's third start, and the team began to lay the groundwork to make sure he remained in San Francisco for the foreseeable future.

General manager John Lynch was immediately convinced that Garoppolo could be the answer at quarterback, so why wasn't Shanahan? He offered the following humorous analogy.

"When I go buy a house, I drive my wife crazy," Shanahan said. "We walk in, and she loves everything, and I point out every single thing that's wrong with it. She gets extremely embarrassed. She's almost in tears. Then we leave the house, and she just won't even ask because she knows I hated it and she loved it.

"And then she's like finally, 'So, what did you think?' I go, 'I liked it. I think we should get that one.'

"And she's like, 'Well, what the heck?' I look at what's wrong with it, see, and then I'm, 'No, we can do this. This is a good house.'

"With Jimmy, when you come in, that's how I look at things. I was very excited to get him, but he had played a game-and-a-half of football. We were in a very good situation, as I've said before. We knew at the end of the year, whether it was the draft, whether it was other free agents, we knew we were going to be able to have an opportunity to get some good quarterbacks.

"We also knew Jimmy could be one too, but you don't know that for sure. We like to make people earn that. They've got to show it, and Jimmy handled it right, and I thought it was going to be very hard for him to do that with just our situation with the team, him coming in in the middle of the year. So I wasn't trying to make up my mind quick. I thought, worst case scenario, we'd franchise him, keep him here, give him an offseason, and make our decision then.

"Credit to him and the team. He got in and played very well, showed us enough on the field and showed us enough in the building on what type of person he was."

You can listen to the entire interview with Shanahan below.