SANTA CLARA, Calif. — The San Francisco 49ers have little time to dwell on a heartbreaking loss to Aaron Rodgers and the Green Bay Packers.

The Niners have to immediately shift their focus to another tough test with the undefeated Los Angeles Rams coming to town on Sunday.

Coach Kyle Shanahan spent Tuesday morning going over the details of the previous night's 33-30 loss to the Packers that featured Rodgers throwing the game-tying touchdown pass with 1:55 to play and then leading the game-winning field goal drive after an interception by C.J. Beathard.

Then it was quickly on to the Rams (6-0), the NFL's only remaining unbeaten team, who will take on the 49ers (1-5) in just five days.

"Short weeks are always tough, but sometimes it can be a good thing," Shanahan said. "Last night was a heartbreaking loss. Our guys came out and I thought played extremely aggressive, very confident and gave it their all. Whenever you do that, it gave us a chance to win that game and we came up short. That's tough. The guys put a lot into it and that's hard. You get back here and it hurts a little bit today, but the good thing is, you've got to move on faster. There's no time to sit here and sulk."

The Niners had their chances to earn their first win in three games since losing starting quarterback Jimmy Garoppolo to a season-ending knee injury on Sept. 23.

Beathard threw two TD passes in the first half in his best performance of the season to help the Niners build a 24-20 lead. Raheem Mostert provided a boost to a running game that gained 174 yards. The defence limited Rodgers to two field goals during a seven-drive stretch starting in the second quarter.

But it wasn't enough. Rodgers picked on backup cornerback Greg Mabin to lead the tying TD drive capped by a 16-yard pass to Davante Adams.

The 49ers then took over at their 47 with 1:49 to go after a personal foul on the kickoff return. Needing just 20 yards to get into field-goal range, Beathard completed a 7-yard pass to George Kittle on first down, had a pass batted down at the line on second down and then took a deep shot against the blitz on third down that turned into the interception by Kevin King.

By not running the ball on second or third down, the Niners gave Rodgers 1:07 to drive for the winning field goal and he delivered.

"If I were to have it back, yeah, I'd love to call something that worked," Shanahan said. "But, then when you get into third-and-3 versus an all-out blitz, there's not many runs for that. That was the play that we didn't make right there and that's what happened. But, you're always concerned about giving it back to Aaron. I thought we had a chance to win the game right there. I know our defence struggled in the first half definitely. I was happy with how they rebounded in the second half and they gave us a chance on offence to put them away. I thought that was our biggest opportunity right there and we came up short."

The 49ers made a roster move Tuesday, signing Tom Savage to a one-year deal to be the team's No. 3 quarterback.

San Francisco has been looking for help at quarterback ever since Garoppolo went down with his injury last month. Beathard was promoted to starter and Nick Mullens was elevated from the practice squad to be the backup.

Savage was originally drafted by Houston in the fourth round in 2014. Savage played 13 games with nine starts in four seasons with the Texans. He completed 181 of 315 attempts for 2,000 yards, five touchdowns and seven interceptions. He spent training camp with New Orleans before being cut Sept. 1.

"There's one thing I always liked about Savage, from coming out of college. He's got a strong arm. He's a very tough player. He hangs in that pocket and plays the position well," Shanahan said. "I was a fan of his coming out of college. He's gotten to play in a number of NFL games so he's been battle-tested. He was in a tough situation in Houston that didn't work out for him, but I got to study him this preseason when he was in New Orleans and they have some similarities in their offence as ours."

NOTES: CB K'Waun Williams (shoulder), CB Ahkello Witherspoon (concussion) and CB Jimmie Ward (hamstring) are all day to day. ... The 49ers waived TE Cole Wick to make room on the 53-man roster for Savage. ... OL Zack Golditch was released from the practice squad.

___

More AP NFL: https://apnews.com/tag/NFL and https://twitter.com/AP_NFL