CHICAGO -- Bears coach John Fox inadvertently gave the ball away when he challenged in hopes of a play by running back Benny Cunningham being ruled a touchdown in the first half of Sunday's 23-16 loss to the Green Bay Packers.

At 8:09 of the second quarter, Bears quarterback Mitchell Trubisky hit Cunningham on a short screen pass that he turned upfield for 23 yards.

Cunningham tried to score on the play but was ruled out of bounds at the 2-yard line, even though he extended his arms and hit the pylon in the front corner of the end zone with the football around the same time his foot made contact with the ground.

Fox immediately challenged the play, arguing it should have been a touchdown since the ball hit the pylon before Cunningham's foot hit out of bounds.

Fox said following the Bears loss that he challenged the play because "every indication we had was that he scored."

"Obviously that's a play that you'd like to have back but that's not how it works," he said.

But upon further review, officials said Cunningham lost control of the football before it made contact with the pylon, and referee Tony Corrente ruled the play a touchback and awarded the ball to Green Bay at the 20-yard line.

Corrente confirmed to a pool reporter after the game that Cunningham was ruled out of bounds at the 2, and the call was changed after the video review to Cunningham losing the "ball in his right hand first, probably, I'm going to guess, 2 feet maybe short of the pylon."

"We had to put together two different angles in order to see both hands losing the football," Corrente said. "After he lost it the second time, it went right into the pylon. Which creates a touchback."

Cunningham said he thought it was a TD at first, but he agreed with the call after watching the replay.

"Coaches go over it every week. Unless it's fourth down, you don't reach the ball out at the goal line, in the red zone,'' he said. "They talk about it. I go down at the 1, next play it's first-and-goal and we hand the ball to Jordan (Howard). It's a touchdown. So it was a bad decision.''

The challenge that backfired comes at a bad time for Fox, who is 12-28 since taking the Bears job in 2015.