SANTA CLARA, Calif. — Quarterback Mitch Trubisky seemed to know when the ball left his right hand that his pass was doomed.

“I probably could have just ran and got out of bounds, looking back on it,” he said.

Instead, Trubisky short-armed his throw to receiver Anthony Miller in the end zone, and it was intercepted by 49ers defensive back K’Waun Williams.

“I wanted to go right over that guy,” he said. “But it was just lucky that it got negated.”

Yes, Trubisky was lucky. Rookie linebacker Fred Warner was called for defensive holding away from the play in the middle of the field.

But what mattered more to coach Matt Nagy was how Trubisky played after his gaffe in the second quarter of the Bears’ 14-9 victory at Levi’s Stadium on Sunday.

Three plays later, Trubisky threw a four-yard touchdown pass to Miller on a sprintout play to his left. It started a run of 11 consecutive completions, which included going 9-for-9 in the third quarter. An erratic performance transformed into an efficient one.

Trubisky completed 25 of 29 passes — an 86.2 completion percentage — for 246 yards and a touchdown. His performance had some stomach-churning moments, though. Trubisky’s decision to throw a lateral to running back Tarik Cohen on a beaten triple-option play arguably was worse than his negated interception. It turned into a lost fumble.

“That was one of those situations where I could have made a better decision after I pulled it,” Trubisky said.

But he still finished with a 113.5 passer rating in a game that featured several momentum swings against a team that just ended the Seahawks’ four-game winning streak last week.

“It’s all about overcoming adversity and a next-play mentality,” Trubisky said. “You just stay calm within each moment.”

The Bears’ character showed, whether it was Trubisky’s own performance, the entire team standing up for Trubisky after safety Marcell Harris’ late hit or the defense making a stand in the final two minutes after receiver Allen Robinson’s awful fumble.

“I just think the experiences that we’ve been through have just made us a stronger, smarter team, and more importantly, have united us as a family,” Trubisky said. “The things that we’ve been through and the experiences in each game, you take that and you carry that with you.”

That comes with an X’s and O’s component, too. Trubisky’s resolve also included going 7-for-7 during a scoring drive in the third quarter after the 49ers adjusted their plans for him. The results were similar to what happened last week against the Packers.

RELATED

• Bears fight for Mitch Trubisky — and for playoff seeding — in win vs. 49ers

• Bears’ victory was much more of a trial than it should have been

“We had to dink and dunk a little bit just to move the ball up the field,” Trubisky said. “They were just bailing out, playing zones. They wanted to take away the deep ball and just the explosive plays.”

Still, the Bears’ victory didn’t lack big-time throws from Trubisky. His 43-yard bomb to Robinson in the first quarter and his 26-yarder down the sideline to running back Taquan Mizzell on a scramble certainly stand out.

Trubisky also did what was needed and expected from him during a time-consuming drive in the fourth quarter. Two plays after the scuffle, he gained two yards on a sneak on fourth-and-inches from the Bears’ 35. He then converted a third-and-four and third-and-three, respectively, with pinpoint throws to Robinson in single coverage.

Robinson’s lost fumble on the second third-down conversion required a defensive stand, but it shouldn’t discount what Trubisky did in those important moments.

“Put it this way,” coach Matt Nagy said, “he did everything that we asked, and even better in those situations.”

In other words, it was a topsy-turvy game that still had meaning for Trubisky and a young team as it enters the postseason.

“He’s now taking that next step,” Nagy said, “and I love to see it.”