OAKLAND, Calif. — Derek Carr’s fourth-quarter mistakes kept turning into Kansas City touchdowns and sent the Chiefs to their sixth straight win.

Jeremy Maclin had two touchdowns catches after fourth-quarter interceptions and Tyvon Branch returned a third pick from Carr for a game-clinching score against his former team as the Chiefs rallied to beat the Oakland Raiders 34-20 Sunday.

The Raiders (5-7) were leading by six points and driving for more when Carr’s mistakes changed the tide of the game and helped keep the Chiefs (7-5) in the lead in the AFC wild-card race.

Alex Smith threw two touchdown passes and ran for a third score and Maclin had 95 yards on nine catches to lead the Chiefs.

Carr threw for 283 yards and two touchdowns, but his three fourth-quarter interceptions sent Oakland to its fourth loss in five games.

The game turned odd late in the third quarter after the Raiders took a 20-14 lead on a 5-yard TD pass from Carr to Lee Smith. But Sebastian Janikowski hit the upright on the extra point, ending a streak of 225 straight makes.

The Raiders then forced a punt and were driving to make it a two-score game when Carr tried to make something out of nothing and it cost him. He tried to throw the ball away to avoid a sack, but was hit on the play and the ball went right to linebacker Josh Mauga, who rumbled 65 yards to the 2 on the return.

advertisement | advertise on newsday

Maclin then scored on a 1-yard pass from Smith. But the holder Dustin Colquitt couldn’t get the snap down and the Chiefs missed the extra point, keeping the game tied at 20.

Carr then threw another interception on the next possession after a miscommunication with Amari Cooper and Oakland native Marcus Peters returned it 58 yards to the 13. Maclin then took a short pass and ran 13 yards for the go-ahead score only to have kicker Cairo Santos miss the point after attempt.

The botched kicks proved contagious as Janikowski hit the upright again on Oakland’s ensuing possession on a 49-yard field goal try.

The Raiders got another chance, but Branch scooped up a pass that deflected off Cooper’s hands and ran it back 38 yards for the score. This time, the Chiefs went for the 2-point conversion and made it on Smith’s pass to Travis Kelce to make it 34-20.

The Raiders took a 14-7 lead going into the half after Charles Woodson ripped the ball away from Kelce with the Chiefs in field goal range and returned it 38 yards to the Kansas City 36. It was Woodson’s second fumble recovery of the game and Oakland took the lead four plays later when Michael Crabtree caught a 25-yard pass from Carr between two defenders for his seventh touchdown of the season.

NFL videos

The teams traded TD drives on the opening possession before the defenses took over. Latavius Murray ran for 50 yards on Oakland’s first drive, capped by his 2-yard run that put the Raiders up 7-0.

Smith scrambled 3 yards for a score on Kansas City’s first drive to tie the game.

The Raiders were stopped on downs when Cooper dropped a pass on fourth-and-2 and then punted the next four times they had the ball. Maclin lost a fumble for the Chiefs on their second drive ending a run of five straight games without a turnover before punting three straight times.