EAST RUTHERFORD, N.J. — At the end of regulation Sunday, Bears coach Matt Nagy was at his aggressive best. At the end of the first half, he was at his aggressive worst.

The result — a 30-27 overtime loss to the Giants — was the product of quarterback Chase Daniel playing like a lifelong backup and a Bears defense that couldn’t stop running back Saquon Barkley, whose 29-yard run helped set up Aldrick Rosas’ 44-yard field goal in the extra period.

But it also was rooted in two major decisions Nagy made: to take a timeout toward the end of the first half and to run a trick play as time expired in the second.

First, the trickery. There wasn’t any doubt in Nagy’s mind about which play he would call after the Giants were flagged for pass interference in the end zone with three seconds left in regulation. He and the coaching staff had discussed the play — called ‘‘Oompa Loompa,’’ which they had worked on for weeks — before the Bears’ last-gasp possession began.

With the Bears trailing 27-20, Daniel took the shotgun snap and handed off to tight end Trey Burton, who was lined up to his right as a halfback. Burton, who threw the pass in the similar-looking ‘‘Philly Special’’ in the Super Bowl last season, flipped the ball to running back Tarik Cohen on an end-around. Cohen ran right and looked for Daniel, his first option, but he was covered. Instead, he threw to receiver Anthony Miller for the touchdown with no time left.

The Bears kicked the extra point — Nagy said he didn’t want to go for two because ‘‘I felt like we were in a good spot’’ — and the game went into overtime.

‘‘He’s gonna call the best play,’’ left tackle Charles Leno Jr. said. ‘‘He’s gonna be aggressive. He’s gonna stay on the attack.’’

The Bears’ offense scored 10 points in the last 1:13 of regulation, thanks in part to Giants star Odell Beckham Jr. alligator-arming an onside kick. He later said, ‘‘Nobody should ever question my effort or my heart.’’ Bears tight end Daniel Brown recovered the ball and set up Nagy’s eventual play-call.

RELATED
Not their best work: ’Sloppy . . . undisciplined’ Bears defense pays the price
Call him the ‘Freezer’: Defensive lineman Akiem Hicks runs in TD for Bears

‘‘He’s got guts,’’ Burton said of Nagy. ‘‘I wouldn’t expect anything less.’’

Those guts, however, might have cost the Bears the game. Taking a timeout toward the end of the first half backfired spectacularly.

After the Bears sacked Eli Manning twice in as many plays, the Giants seemed content to trot to the locker room trailing 14-7. But Nagy decided to take a timeout before third down with 17 seconds left.

It was a head-scratcher even in the moment. If the Bears wanted to get the ball back to try to score, Nagy could have called timeout immediately after defensive lineman Akiem Hicks’ sack. Instead, he let about 20 seconds pass before calling it.

Forced to run a play, the Giants handed off to Barkley, who gained 22 yards on third-and-23. With no timeouts left, the Giants threw a nine-yard pass to tight end Rhett Ellison on fourth-and-one. Ellison got out of bounds with a second left, and Rosas kicked a 57-yard field goal as time expired.

After the game, Nagy said he wanted to try to block a punt. He criticized his defense for allowing the nine-yard pass.

‘‘I take responsibility for that,’’ Nagy said.

The timeout altered the game, Hicks said. The Giants, whose only points before that came on linebacker Alec Ogletree’s pick-six on Daniel’s first pass, took their momentum into the locker room. They then scored touchdowns on their first two drives of the third quarter for a 24-14 lead.

‘‘Of course, that was a boost to them,’’ Hicks said. ‘‘Their offense hadn’t scored up until that point.’’

The Bears, trailing 24-17, got the ball with 2:26 left, but receiver Taylor Gabriel fumbled it back to the Giants on the first play. Rosas’ 37-yard field goal gave them a 10-point lead with 1:49 left, but the Bears quickly drove down the field, aided by a roughing-the-passer flag during Daniel’s 32-yard pass to Cohen (12 catches, 156 yards).

The Bears kicked a 21-yard field goal to pull to 27-20. Then came the onside kick, recovery and trickery.

‘‘It is kind of high-risk, high-reward with some of these formations, motions and shifts, personnel [groupings],’’ Nagy said. ‘‘So sometimes it can backfire on you. If it doesn’t work, it looks like a dumb play. If it does work, then people are excited about it.’’