SANTA CLARA, Calif. (AP) — Colts coach Frank Reich wasn't about to make the same mistake twice.

After being burned by a conservative third-down run call late in a loss to Baltimore two weeks ago, Reich put the ball in Carson Wentz's hands this time — and it paid off.

Wentz threw a 28-yard TD pass to Michael Pittman Jr. to finish off the San Francisco 49ers on Sunday night in a rain-soaked 30-18 victory.

Instead of playing for a field goal the way he did late against the Ravens that contributed to an overtime loss, Reich stayed aggressive even in the treacherous conditions.

“I felt like something about learning the lesson from the Ravens game,” he said. “We had a third-and-8 and I called a run. I told the guys, ‘I’m not doing that again. I’m throwing a pass.' I don’t care what anybody says. It really comes from trusting your quarterback and trusting your receivers.”

Wentz and Pittman earned that trust, delivering numerous big plays during a driving rain storm that could have made throwing deep difficult.

Pittman had four catches for 105 yards and a touchdown. He also drew two other pass interference calls as Wentz repeatedly looked his direction as the Colts (3-4) overcame the wet conditions and an early nine-point deficit to win for the third time in four games following an 0-3 start to the season.

“It seems like he just goes into a kind of a beast mode kind of deal,” running back Jonathan Taylor said of Pittman. “When the ball is in his hands, he’s like, ‘No one is stopping me.’ And if the ball is in the air, he’s like, 'This ball is mine, or it's a PI. This is my ball.'"

The 49ers (2-4) dropped their fourth straight game and remained winless at home for more than a year since beating the Rams on Oct. 18, 2020, as the return of starting quarterback Jimmy Garoppolo failed to provide any spark on a wet night.

Garoppolo threw for 181 yards, lost a fumble, threw two interceptions and struggled to push the ball downfield in his first game back after missing one game with a calf injury.

“The NFL is a crazy thing," Garoppolo said. "One week, you’re on top. One week, you’re at the bottom of it. Every team has its ups and downs. We’re at the lower point right now. But we can fight back.”

Wentz and the Colts were able to do just enough on offense thanks to three pass interference penalties for 97 yards and a productive game on the ground from Taylor, who ran for 107 yards and a score.

Wentz threw an 11-yard TD pass to Mo Alie-Cox in the first quarter and then led two short TD drives following fumbles by San Francisco, leading to his 1-yard score late in the first half and Taylor's 5-yard run that made it 20-12 late in the third.

Garoppolo led a TD drive early in the fourth, cutting the deficit to 20-18 on a 14-yard throw to Deebo Samuel. But his 2-point try was batted down at the line.

The Colts then put it away by driving for a field goal and getting the late TD pass from Wentz to Pittman on another short field after Xavier Rhodes intercepted Garoppolo.

“I've got to catch them,” Pittman said. “Carson can really throw it out there, so I just got to make sure that I’m the one who comes down with it.”

IN THE SLOP

The driving rain storm had a big impact on the game, especially during a stretch midway through the second quarter.

Colts running back Nyheim Hines got wide open downfield on a third-down pass that slipped right through his hands.

Indianapolis then punted and Brandon Aiyuk muffed the ball before kicking it back nearly 20 yards into the end zone. He recovered it and it was ruled a touchback because he never had possession.

Wentz and Garoppolo both fumbled snaps that they recovered later in the quarter before Samuel lost a fumble for San Francisco at his own 28 on a perfect punchout by Darius Leonard.

That set up a 1-yard run by Wentz that gave the Colts a 13-12 halftime lead.

TAKE IT AWAY

The Niners came in with a league-low two takeaways but doubled that total in the first half.

Taylor fumbled on Indianapolis first play from scrimmage and Fred Warner recovered to set up a field goal by Joey Slye that made it 9-0.

Wentz then made an inexplicable decision early in the second quarter. As he was trying to run away from Nick Bosa, Wentz appeared to flip the ball forward right into Azeez Al-Shaair's hands. It was ruled a fumble.

INJURY REPORT

Colts: CB BoPete Keyes (hamstring) left in the first half and didn't return.

49ers: LT Trent Williams was scratched after aggravating an ankle injury last week in practice. Rookie Jaylon Moore made his first career start in his place. ... S Jaquiski Tartt (knee), DE Dee Ford (head injury) and CB Emmanuel Moseley (back) all left the game.

UP NEXT

Colts: Host Titans on Sunday.

49ers: Visit Chicago on Sunday.

___

More AP NFL coverage: https://apnews.com/hub/NFL and https://twitter.com/AP_Sports