CHICAGO — Robbie Gould pumped his right arm and screamed at the Chicago sideline. Kicking the winning field goal sure made it a sweet return to Soldier Field.

Gould nailed a 24-yarder in the closing seconds, Jimmy Garoppolo threw for 293 yards in his first San Francisco start, and the 49ers beat the Chicago Bears 15-14 on Sunday.

Gould made all five field goals – none longer than 35 yards – in his first appearance at Soldier Field since Chicago cut him prior to the 2016 opener. The Bears’ all-time leader in points and field goals made, he let it all out after he booted the winner right down the middle.

“I wanted this one really bad,” Gould said. “I downplayed it all week for my own peace of mind, to be honest with you. I’m just happy it went this way.”

Garoppolo was solid in his first start since the 49ers (2-10) acquired him from New England before the trade deadline in October. The suburban Chicago and Eastern Illinois product completed 26 of 37 passes with an interception. And the 49ers picked up the win after losing their first five road games.

Garoppolo grew up a Bears fan but didn’t attend an NFL game until he entered the league.

“I tried to say all week that it was just a normal game, but obviously, I’d never come back to Chicago like this,” Garoppolo said. “It’s exciting. I had a ton of people here. It was one of the more fun games I’d been a part of.”