GREEN BAY, Wis. (AP) — Colts coach Chuck Pagano returned home to Indianapolis in a good mood.

A 31-26 win Sunday on the road over the Green Bay Packers should do wonders for his team’s confidence going into a bye week.

Jordan Todman had a 99-yard return for a touchdown on the opening kickoff, Frank Gore rushed for two touchdowns and Andrew Luck shook off two interceptions in the first quarter with two clutch third-down throws in the fourth quarter to hold off the Packers.

This was about as close as a must-win game as it could get at midseason for Indianapolis (4-5).

“Everybody knew exactly where we were and what the stakes were. It’s a whole different world today, right now. Tomorrow will be a totally different world,” Pagano said. A 4-5 record “is way different coming off this then going back home and being 3-6.”

The Colts survived after letting an 18-point lead with 9:35 left nearly disappear. They withstood Aaron Rodgers’ comeback attempt.

“Not an ideal start offensively … from my game, the two interceptions. Like anything, you’ve got to move on,” Luck said . “The defense built up strong early, which was huge. Then made enough plays at the end to win.”

Rodgers’ 3-yard touchdown pass to Randall Cobb with 3:29 left got Green Bay (4-4) within five, capping a 14-point spurt in four-plus minutes. Rodgers finished 26 of 43 for 297 yards with three scores and an interception.

Luck responded on the Colts’ next drive with what Pagano called “two unbelievable plays.”

Luck also found T.Y. Hilton for a 27-yard completion on third-and-2 with 2 minutes left to put the game away. He finished 23 of 36, throwing both interceptions to Clinton-Dix.

“We didn’t play good enough, I’m disappointed, I’m irritated, the fact that we were not sharp as a football team,” Packers coach Mike McCarthy said.

Other notes and takeaways from the game:

PROTECTING LUCK

The Colts, who had allowed an NFL-worst 31 sacks coming into the game, gave their quarterback decent protection. Luck was sacked twice and maneuvered out of other tight spots, including a 7-yard scramble on a bootleg on third-and-1 with 37 seconds left in the second quarter.

He deftly engineered a 15-play, 96-yard drive that ended with an 8-yard touchdown pass to Donte Moncrief with 11 seconds left to give Indianapolis a 21-10 halftime lead.

LOW ENERGY?

Familiar problems surfaced early for the Packers, who lost their second straight game. The offense had trouble getting going until the fourth quarter. But the defense gave up at least 30 points for a second straight game, and special teams also hurt them.

Todman’s kickoff return to open the game seemed to be a Green Bay buzz-killer.

“We’ve all got to be a little mentally tougher. I don’t understand the way the sideline was after that first play. We go down, let’s get a field goal and we’ll win the game. It’s 7-3 early on. We’ve got to be a little tougher. That’s the mark of a team,” Rodgers said.

INJURIES

Rodgers said he had his left foot stepped on “pretty hard. I mean, that’s a common frustration from time to time, just getting stepped on really badly. It’s fine.”

Cobb finished with two catches for 14 yards. Questionable before the game with a hamstring injury, Cobb didn’t play until the second half.

“I took a conservative approach with him. I was going to use him only when we needed him. Obviously, we needed him in the second half and he gave us everything he’s got,” McCarthy said.

Safety Micah Hyde (shoulder) left in the fourth quarter. The Colts had no injuries to report.

The squirrel first made its appearance in the first half, then returned late in the third quarter. With the Packers driving at about the Colts 12, the squirrel dashed along the goal line, forcing the officials to call timeout. The squirrel finally went out of bounds, but not before causing a stir on social media .

The Packers had to settle for a 27-yard field goal with 1:46 left to get within 24-13. No word on if the squirrel made the traditional Lambeau Leap to celebrate.