DENVER — Khalil Mack couldn’t be stopped.

Mack had five sacks of Brock Osweiler, including one in the end zone for a safety, and Derek Carr bounced back from an awful first half to lead the Oakland Raiders past the Denver Broncos 15-12 Sunday.

Carr threw two touchdown passes and the Raiders (6-7) beat the Broncos for the first time since Sept. 12, 2011, despite being held to minus-12 yards in the first half — the worst performance by a team heading into halftime in nearly a quarter-century.

The Broncos (10-3) failed to hold onto a 12-0 halftime lead or several on-target throws from Osweiler, including two big drops by Demaryius Thomas, one for a touchdown and another for a late first down.

The one that really stung was a drop by a wide-open Vernon Davis at the Oakland 42 on fourth-and-5 from the Denver 37 with 3:45 left.

Denver got the ball back with 2:35 left at its 8, but only reached the 21 thanks to Mack’s fifth sack.

advertisement | advertise on newsday

The Raiders drove 80 yards to open the second half and trim Denver’s lead to 12-7 when Carr threw an 11-yard pass to Seth Roberts.

A safety pulled the Raiders to 12-9 when Mack sacked Osweiler in the end zone and Broncos guard Max Garcia recovered the loose ball.

Oakland long snapper Jon Condo recovered Emmanuel Sanders’ muffed punt at the Denver 11 early in the fourth quarter, but he injured his right shoulder in the pile. He was in the locker room getting it looked at when Carr threw a 16-yard touchdown pass to tight end Mychal Rivera to put Oakland ahead 15-12 with 14:26 remaining.

Without Condo, the Raiders went for 2 and Carr threw an incompletion, leaving the margin at a field goal.

Brandon McManus, who nailed four field goals in the first half, clanked a 49-yarder that would have tied it off the left upright with 10:22 remaining, however. Sebastian Janikowski then missed a 43-yarder with 5:07 remaining, giving the Broncos good field position at their 33, but Davis had his big drop on fourth down after that.

NFL videos

The Broncos couldn’t get into the end zone in the first half despite 224 yards of offense, settling for four field goals from McManus, each one shorter than the previous — 41, 35, 29 and 21 yards.

Oakland’s lack of production in the first 30 minutes was the lowest figure by any team in the first half since Nov. 1, 1992, when the Chargers held the Colts to minus-5 yards.

Peyton Manning, missing his fourth straight start with a left foot injury, watched this one from the sideline after skipping the Broncos’ trips to Chicago and San Diego and viewing Denver’s win over New England from inside the locker room area.

He avoided going over to Osweiler between series, chatting instead with assistant coaches.

Manning, who resumed throwing last week after his cast and walking boot came off, hasn’t rejoined his teammates at practice and there’s still no telling if he’ll get healthy enough to play again this season.

advertisement | advertise on newsday

Osweiler completed his first 10 passes, covering 82 yards, but the Broncos sorely missed ramming running back C.J. Anderson, who was sidelined by an ankle injury.

And they couldn’t block Mack.