San Francisco 49ers cornerback Richard Sherman says that losing a big lead against the Detroit Lions in Week 2 will serve as a humbling lesson for him and his teammates. The 49ers barely squeaked by the Lions in a 30-27 victory.

The 49ers led 30-13 with over 11 minutes remaining in the fourth quarter. The Lions responded by scoring on back-to-back drives, reducing their deficit to three. They almost got the ball back a third time when an interception Jimmy Garoppolo threw was called back because of a holding penalty in the closing minutes of the game.

The 49ers and Lions both lost their season openers, so it was an important game for both sides, via Matt Maiocco of NBC Sports.

“It’s a good learning lesson for a young team that we needed. It’s a humbling lesson. Thank goodness we got the win out of it. There’s a lot of good tape, a lot of good learning for us. I think it’s going to be a humbling experience for a lot of our players,” said Sherman.

Garoppolo completed 18 of his 26 passing attempts for 206 yards and two touchdowns in his first win of the season. He was missing his top target Marquise Goodwin, but they got a huge game Matt Breida, who rushed for 138 yards and a touchdown on 11 carries.

“Sherm has a great mindset,” Garoppolo said. “It’s a good thing. I was just talking to some of the guys. It’s a different mindset than last year. Last year, if we got a win, we were happy about it. Now, you kind of progress as a team.”

The 49ers will try to learn from their mistakes and close better against the Kansas City Chiefs next week. If the 49ers get ahead early, they can't afford rest on their laurels against this explosive offense led by Patrick Mahomes.