"It's hard to win in the NFL," San Francisco 49ers head coach Kyle Shanahan said on Sunday following the team's first victory of the season.

The 49ers beat the New York Giants, who came into the game with one victory themselves, 31-21 at Levi's Stadium.

It feels good to win in the National Football League. It feels good to get your first win of the season, even if it comes after nine-straight losses. On Sunday, the 49ers guaranteed that they will not end the season winless and finally got Shanahan his first victory as a head coach.

"I feel good," Shanahan said. "I feel very good. I didn't know it would take this long but it was special with the guys and I was real happy for them. Those guys have been working so hard, and we just keep coming in every Monday so disappointed. And by the time I see them every Wednesday, those guys are -- it's like the first game of the year.

"To have them still out there going like that with how many we've lost in a row, that's what gave us a chance to win today, and I'm just real happy for them."

49ers players celebrated with their head coach following the hard-fought victory. The 49ers now head into their bye week on a positive note but will meet on Monday to savor the victory before taking some time off.

"You lose nine in a row and you learn to savor the moments and enjoy these," Shanahan said. "It was tough work for us to get our first win and we got it. I think the guys knew how much it meant to me and I know how much it meant to them. I think we're a pretty close team and I think we've gotten closer through adversity and I hope this can make us better through adversity also."

Shanahan knows that one win was never the goal of the season and will now work hard to get the team's next victory. The 49ers' next opportunity will be on November 26 when they host the Seattle Seahawks at Levi's Stadium.

"That was just one win, but it definitely felt good, and we worked hard for it," Shanahan said. "That's not what our goal is. We've got a lot of goals ahead of us, and we feel we're going in that direction, but it was nice to a win for everyone here."