KANSAS CITY, Mo. (AP) -- Philip Rivers came through when the San Diego Chargers needed him the most.

The once-embattled quarterback threw for 392 yards and three touchdowns, the final one a 26-yarder to Seyi Ajirotutu with 24 seconds remaining, to give the Chargers a 41-38 victory over the Kansas City Chiefs on Sunday and end a three-game losing streak.

The Chiefs had taken the lead when Alex Smith hit Dwayne Bowe for a go-ahead score with 1:22 left. But the Chargers (5-6) still had two timeouts, and they used both to quickly move downfield. Ajirotutu's TD in tight coverage was just his third catch of the season.

It also represented the eighth and final lead change in the game.

Smith threw for 292 yards and three touchdowns for the Chiefs, who dropped their second straight after a 9-0 start. They also lost top pass rushers Tamba Hali and Justin Houston to injuries and now have to turn their attention to the Denver Broncos next week.

Jamaal Charles added 115 yards rushing and two touchdowns. Donnie Avery had four catches for 91 yards and a score as Kansas City produced its best point total of the season.

It still wasn't quite enough.

Danny Woodhead had touchdowns rushing and receiving as he picked up the slack for Chargers running back Ryan Mathews, who left with a hamstring injury. Ladarius Green had a 60-yard touchdown reception in the fourth quarter, while Keenan Allen had nine catches for 124 yards.

San Diego finished with 491 yards of offense against a Chiefs defense that had allowed more than 17 points just once: last week's 27-17 defeat in Denver.

Hali rolled his right ankle and was taken to the locker room on a cart and did not return. The Chiefs lost their other pass rusher later in the first half, when Houston was banged into during a scrum and left holding his right elbow.

The game turned into a back-and-forth nail-biter in the second half.

San Diego pulled ahead 17-14 when a 54-yard pass to Eddie Royal set up a 1-yard TD run by Mathews. But the Chargers helped the Chiefs take the lead right back with three pass interference penalties that gave them the ball at the San Diego 1. Charles' second touchdown made it 21-17.

The Chargers' embattled defensive backfield got one back on the Chiefs' next series. Shareece Wright, who had one of those pass interference penalties, batted a pass to Marcus Gilchrist, who had one of the others. The interception set up Woodhead's 3-yard touchdown run.

Kansas City retook the lead at 28-24 on Smith's short touchdown pass to Anthony Fasano, but after the teams traded chip-shot field goals early in the fourth quarter, the Chargers took it right back.

Rivers hit Green on a quick slant route, and the tight end ran 60 yards for his first career touchdown. It gave the Chargers a 34-31 lead with 7:50 left in the game.

The Chiefs answered the call, only for the Chargers to trump them in the end.

___

Online: http://pro32.ap.org and http://twitter.com/AP_NFL

Also on HuffPost:

Loading Slideshow...
  • Clay Matthews

    Green Bay Packers' Clay Matthews is introduced before the first half of an NFL football game against the Minnesota Vikings Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Morry Gash)

  • Maurice Jones-Drew

    Jacksonville Jaguars running back Maurice Jones-Drew (32) bows after making a touch run during the first quarter an NFL football game against the Houston Texans Sunday, Nov. 24, 2013, in Houston. (AP Photo/Patric Schneider)

  • Derek Wolfe, Von Miller, Tom Brady

    New England Patriots quarterback Tom Brady (12) loses the ball while being sacked by Denver Broncos linebacker Von Miller, rear, as Broncos defensive end Derek Wolfe (95) closes in in the first quarter of an NFL football game Sunday, Nov. 24, 2013, in Foxborough, Mass. (AP Photo/Stephan Savoia)

  • Bruce Arians, Chuck Pagano

    Indianapolis Colts head coach Chuck Pagano, right, smiles as he and Arizona Cardinals head coach Bruce Arians hug prior to an NFL football game Sunday, Nov. 24, 2013, in Glendale, Ariz. Arians was an assistant coach under Pagano last season, and was the interim head coach when Pagano was out battling leukemia last season. (AP Photo/Ross D. Franklin)

  • Danny Woodhead

    San Diego Chargers running back Danny Woodhead (39) heads over to give a fan the ball after scoring a touchdown during the first half of an NFL football game against the Kansas City Chiefs at Arrowhead Stadium in Kansas City, Mo., Sunday, Nov. 24, 2013. Chargers wide receiver Keenan Allen (13) celebrates the play. (AP Photo/Ed Zurga)

  • A soldier salutes during pregame events of an NFL football game between the San Diego Chargers and Kansas City Chiefs at Arrowhead Stadium in Kansas City, Mo., Sunday, Nov. 24, 2013. (AP Photo/Charlie Riedel)

  • Tavon Austin, Zack Bowman

    St. Louis Rams wide receiver Tavon Austin, left, runs past Chicago Bears cornerback Zack Bowman on his way to a 65-yard touchdown run during the first quarter of an NFL football game on Sunday, Nov. 24, 2013, in St. Louis. (AP Photo/Nam Y. Huh)

  • Leonard Johnson

    Tampa Bay Buccaneers cornerback Leonard Johnson (29) jumps into the end zone after a 48-yard interception for a touchdown during the first half of an NFL football game against the Detroit Lions in Detroit, Sunday, Nov. 24, 2013. (AP Photo/Paul Sancya)

  • Peyton Manning, Rob Ninkovich,

    Denver Broncos quarterback Peyton Manning (18) passes over New England Patriots defensive end Rob Ninkovich (50) in the first quarter of an NFL football game Sunday, Nov. 24, 2013, in Foxborough, Mass. (AP Photo/Elise Amendola)

  • J.J. Watt

    Houston Texans defensive end J.J. Watt (99) leads a team huddle before an NFL football game against the Jacksonville Jaguars Sunday, Nov. 24, 2013, in Houston. (AP Photo/David J. Phillip)

  • Tony Romo

    Dallas Cowboys quarterback Tony Romo (9) gestures while leaving the field after an NFL football game against the New York Giants, Sunday, Nov. 24, 2013, in East Rutherford, N.J. The Cowboys won 24-21. (AP Photo/Bill Kostroun)

  • Matt Flynn

    Green Bay Packers' Matt Flynn throws during the second half of an NFL football game against the Minnesota Vikings Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Morry Gash)

  • Peyton Manning

    Denver Broncos quarterback Peyton Manning (18) stands on the sideline in the fourth quarter of an NFL football game against the New England Patriots Sunday, Nov. 24, 2013, in Foxborough, Mass. (AP Photo/Stephan Savoia)

  • Fozzy Whittaker, Troy Polamalu

    Cleveland Browns running back Fozzy Whittaker (35) runs against Pittsburgh Steelers safety Troy Polamalu (43) in the first quarter of an NFL football game Sunday, Nov. 24, 2013, in Cleveland. (AP Photo/Tony Dejak)

  • A B-17 Bomber flies over Lambeau Field before the first half of an NFL football game between the Green Bay Packers and the Minnesota Vikings Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Jeffrey Phelps)

  • Cecil Shorts, Brandon Harris, Johnathan Joseph

    Jacksonville Jaguars wide receiver Cecil Shorts (84) gets tackled by Houston Texans defensive back Brandon Harris (26) and cornerback Johnathan Joseph (24) during the first quarter an NFL football game Sunday, Nov. 24, 2013, in Houston. (AP Photo/Patric Schneider)

  • Chandler Jones, Peyton Manning

    Denver Broncos quarterback Peyton Manning (18) passes against New England Patriots defensive end Chandler Jones (95) in the first quarter of an NFL football game Sunday, Nov. 24, 2013, in Foxborough, Mass. (AP Photo/Stephan Savoia)

  • Chris Ivory, Haloti Ngata

    New York Jets running back Chris Ivory is upended by Baltimore Ravens' Haloti Ngata during the first half of an NFL football game in Baltimore, Md., Sunday, Nov. 24, 2013. (AP Photo/Gail Burton)

  • Philip Rivers

    San Diego Chargers quarterback Philip Rivers (17) passes to a teammate during the first half of an NFL football game against the Kansas City Chiefs in Kansas City, Mo., Sunday, Nov. 24, 2013. (AP Photo/Ed Zurga)

  • A New England Patriots fan holds a sign about Denver Broncos wide receiver Wes Welker, formerly with the Patriots, in the second quarter of an NFL football game Sunday, Nov. 24, 2013, in Foxborough, Mass. (AP Photo/Elise Amendola)

  • Earl Mitchell, Chad Henne

    Houston Texans nose tackle Earl Mitchell (92) sacks Jacksonville Jaguars quarterback Chad Henne (7) in the first quarter of an NFL football game Sunday, Nov. 24, 2013, in Houston. (AP Photo/David J. Phillip)

  • Clay Matthews, Christian Ponder

    Green Bay Packers' Clay Matthews sacks Minnesota Vikings quarterback Christian Ponder during the first half of an NFL football game Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Mike Roemer)

  • Shareece Wright, Dexter McCluster

    Kansas City Chiefs wide receiver Dexter McCluster (22) is tackled by San Diego Chargers cornerback Shareece Wright (29) during the first half of an NFL football game in Kansas City, Mo., Sunday, Nov. 24, 2013. (AP Photo/Ed Zurga)

  • Matthew Stafford

    Detroit Lions quarterback Matthew Stafford (9) looks downfield as he scrambles during the first quarter of an NFL football game against the Tampa Bay Buccaneers in Detroit, Sunday, Nov. 24, 2013. (AP Photo/Carlos Osorio)

  • Scott Tolzien, Audie Cole

    Green Bay Packers' Scott Tolzien tries to get away from Minnesota Vikings' Audie Cole during the first half of an NFL football game Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Morry Gash)

  • Jared Allen

    Minnesota Vikings' Jared Allen reacts after sacking Green Bay Packers quarterback Scott Tolzien during the first half of an NFL football game Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Jeffrey Phelps)

  • Wade Phillips

    Houston Texans Defensive Coordinator Wade Phillips reacts after Jacksonville Jaguars running back Maurice Jones-Drew (32) makes a touchdown run during the first quarter an NFL football game Sunday, Nov. 24, 2013, in Houston. (AP Photo/Patric Schneider)

  • Jeff Heath

    Dallas Cowboys strong safety Jeff Heath scores on a 50-yard fumble return against the New York Giants during the first half of an NFL football game Sunday, Nov. 24, 2013, in East Rutherford, N.J. (AP Photo/Bill Kostroun)

  • Josh Thomas, Mike Wallace

    Carolina Panthers cornerback Josh Thomas (22) intercepts a ball during the first half of an NFL football game, Sunday, Nov. 24, 2013, in Miami Gardens, Fla. (AP Photo/Lynne Sladky)

  • Alex Smith, Thomas Keiser

    Kansas City Chiefs quarterback Alex Smith (11) avoids the rush of San Diego Chargers linebacker Thomas Keiser (90) after stumbling to the ground during the first half of an NFL football game at Arrowhead Stadium in Kansas City, Mo., Sunday, Nov. 24, 2013. (AP Photo/Orlin Wagner)

  • Chad Henne, Whitney Mercilus

    Jacksonville Jaguars quarterback Chad Henne (7) throws the ball away as Houston Texans outside linebacker Whitney Mercilus (59) pressures him during the first quarter an NFL football game Sunday, Nov. 24, 2013, in Houston. (AP Photo/David J. Phillip)

  • Scott Tolzien

    Green Bay Packers' Scott Tolzien leaps in the crowd after rushing for a touchdown during the first half of an NFL football game against the Minnesota Vikings Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Mike Roemer)

  • Mario Addison, Ryan Tannehill

    Carolina Panthers defensive end Mario Addison (97) sacks Miami Dolphins quarterback Ryan Tannehill (17) during the first half of an NFL football game on Sunday, Nov. 24, 2013, in Miami Gardens, Fla. (AP Photo/J Pat Carter)

  • Jason Pinkston

    Cleveland Browns guard Jason Pinkston cools off on the sidelines before an NFL football game against the Pittsburgh Steelers, Sunday, Nov. 24, 2013, in Cleveland. (AP Photo/Mark Duncan)

  • James Laurinaitis

    St. Louis Rams linebacker James Laurinaitis recovers a fumble by Chicago Bears running back Matt Forte during the first quarter of an NFL football game on Sunday, Nov. 24, 2013, in St. Louis. (AP Photo/Tom Gannam)

  • Scott Tolzien, Chad Greenway

    =tScott Tolzien runs for a touchdown in front of Minnesota Vikings' Chad Greenway during the first half of an NFL football game Sunday, Nov. 24, 2013, in Green Bay, Wis. (AP Photo/Mike Roemer)

  • Dontari Poe, Ryan Mathews

    Kansas City Chiefs nose tackle Dontari Poe (92) tackles San Diego Chargers running back Ryan Mathews (24) during the first half of an NFL football game at Arrowhead Stadium in Kansas City, Mo., Sunday, Nov. 24, 2013. (AP Photo/Ed Zurga)

  • Tony Fiammetta, Matt Forte, Trumaine Johnson

    St. Louis Rams cornerback Trumaine Johnson, right, forces Chicago Bears running back Matt Forte, left, to fumble as Bears fullback Tony Fiammetta (43) watches during the first quarter of an NFL football game on Sunday, Nov. 24, 2013, in St. Louis. The Rams' James Laurinaitis recovered the fumble. (AP Photo/Tom Gannam)

  • Andre Branch

    Jacksonville Jaguars defensive end Andre Branch (90) celebrates after sacking Houston Texans quarterback Case Keenum (7) during the first quarter an NFL football game Sunday, Nov. 24, 2013, in Houston. (AP Photo/Patric Schneider)

  • Terrance Knighton, Kevin Vickerson

    Denver Broncos' Kevin Vickerson (99) celebrates a fumble recovery by Terrance Knighton, right, in the first quarter of an NFL football game against the New England Patriots Sunday, Nov. 24, 2013, in Foxborough, Mass. (AP Photo/Elise Amendola)

  • Zac Stacy, Cory Harkey

    St. Louis Rams running back Zac Stacy, left, is congratulated by teammate Cory Harkey (46) after scoring on a 1-yard run during the first quarter of an NFL football game against the Chicago Bears on Sunday, Nov. 24, 2013, in St. Louis. (AP Photo/Nam Y. Huh)

  • Alex Smith, Kendall Reyes

    Kansas City Chiefs quarterback Alex Smith (11) passes under pressure from San Diego Chargers defensive end Kendall Reyes (91) during the first half of an NFL football game at Arrowhead Stadium in Kansas City, Mo., Sunday, Nov. 24, 2013. (AP Photo/Charlie Riedel)

  • Joe Flacco, Ray Rice, Jaiquawn Jarrett

    Baltimore Ravens quarterback Joe Flacco passes the ball as running back Ray Rice keeps New York Jets free safety Jaiquawn Jarrett (37) away during the first half of an NFL football game in Baltimore, Md., Sunday, Nov. 24, 2013. (AP Photo/Patrick Semansky)

  • Cam Newton, Jared Odrick

    Carolina Panthers quarterback Cam Newton (1) escapes a sack by Miami Dolphins defensive tackle Jared Odrick (98) during the first half of an NFL football game on Sunday, Nov. 24, 2013, in Miami Gardens, Fla. (AP Photo/Lynne Sladky)

  • Jonas Mouton, Alex Smith

    Kansas City Chiefs quarterback Alex Smith (11) is sacked by San Diego Chargers linebacker Jonas Mouton (57) during the first half of an NFL football game at Arrowhead Stadium in Kansas City, Mo., Sunday, Nov. 24, 2013. (AP Photo/Charlie Riedel)

  • Robert Quinn, Josh McCown

    St. Louis Rams defensive end Robert Quinn, left, gets his hand on the ball as Chicago Bears quarterback Josh McCown throws during the first quarter of an NFL football game on Sunday, Nov. 24, 2013, in St. Louis. (AP Photo/Nam Y. Huh)

  • Derek Kelly Petty Officer 1st Class, of Southgate, Mich., holds a field-sized flag during a pregame ceremony at Ford Field before an NFL football game between the Detroit Lions and the Tampa Bay Buccaneers in Detroit, Sunday, Nov. 24, 2013. (AP Photo/Duane Burleson)

  • Daryl Smith, Geno Smith

    New York Jets quarterback Geno Smith passes the ball under pressure from Baltimore Ravens inside linebacker Daryl Smith (51) during the first half of an NFL football game in Baltimore, Md., Sunday, Nov. 24, 2013. (AP Photo/Gail Burton)

  • Victor Cruz

    New York Giants wide receiver Victor Cruz (80) reacts after catching a pass to set up a touchdown during the second half of an NFL football game against the Dallas Cowboys, Sunday, Nov. 24, 2013, in East Rutherford, N.J. The Cowboys won 24-21. (AP Photo/Bill Kostroun)

  • Geno Hayes, Ryan Griffin

    Houston Texans tight end Ryan Griffin (84) makes a reception in front of Jacksonville Jaguars outside linebacker Geno Hayes (55) during the third quarter of an NFL football game Sunday, Nov. 24, 2013, in Houston. (AP Photo/Patric Schneider)

  • Torrey Smith, Antonio Cromartie

    Baltimore Ravens wide receiver Torrey Smith pulls in a pass under pressure from New York Jets cornerback Antonio Cromartie, right, during the first half of an NFL football game in Baltimore, Md., Sunday, Nov. 24, 2013. (AP Photo/Gail Burton)