MIAMI GARDENS, Fla. -- Ryan Tannehill watched the final play from the sideline, hopping anxiously as an opponent's desperation heave hung in the air, then letting out a jubilant scream when a teammate swatted the ball to the turf.
At the end of a dismal week, the Miami Dolphins finally had something to celebrate.
Tannehill threw for 268 yards, including a 39-yard score to Charles Clay, who broke two tackles on the play. Miami managed 104 yards rushing behind a makeshift line.
The victory came amid a harassment scandal that raised questions regarding the team's locker room culture. An NFL special investigator will question players this week about the relationship between offensive tackle Jonathan Martin and guard Richie Incognito.
"There's a lot going on, but we're not focused on that," Tannehill said. "We're focused on football."
The Dolphins (5-5) won for only the second time in the past seven games. They're still in contention for an AFC wild-card berth, despite a dreadful defeat last Monday at Tampa Bay and the distractions of the harassment case.
"We're fighting through this," tackle Tyson Clabo said. "Someone's got to get that last wild-card spot. Why not us?"
The Chargers (4-6), who were plagued by penalties and missed tackles, lost their third game in a row.
"We made too many mistakes from start to finish," coach Mike McCoy said. "We hurt ourselves way too much."
Trailing by four points, San Diego started from its own 17 with 1:54 left and drove to the Miami 25. On the final play, a harried Rivers lofted a pass toward Vincent Brown in the end zone, but the 5-foot-10 Grimes leaped to slap the ball away.
Rivers threw for 298 yards and Ryan Mathews ran for 127, including a career-best, 51-yard dash to set up a field goal. But the Chargers had 10 penalties for 76 yards, including two infractions that cost them 11 points in the first half.
"Ten penalties, that's a lot," Rivers said. "We're not playing well enough to overcome those things."
Miami played at home for the first time since the scandal broke. The stands were less than two-thirds full, and an airplane banner reflected the mood by calling for the firing of general manager Jeff Ireland, who has long been in disfavor with fans.
Because center Mike Pouncey missed the game with an illness, the Dolphins had three backups starting on the offensive line. Martin missed his third consecutive game while undergoing treatment for emotional issues, and the suspended Incognito sat out his second game.
Working behind the patchwork line, Tannehill was sacked four times, increasing his NFL-high season total to 41. But Miami averaged 5.5 yards per rush to limit the Chargers' time of possession.
As usual, the Dolphins went with pass plays two-thirds of the time. On the game's opening drive, they marched 76 yards -- with all but 2 coming through the air -- for a field goal.
Penalties repeatedly hurt the Chargers. Corey Liuget was flagged for roughing the passer to negate a teammate's fumble recovery at the San Diego 1, and two plays later the Dolphins scored a touchdown for a 10-7 lead.
Liuget said he didn't see Tannehill get rid of the ball.
"It was a costly penalty for us," Liuget said. "I wish I could get that one back. It's not a great feeling at all."
A scrambling Rivers hit Antonio Gates for a 5-yard touchdown with a minute left in the first half, but the quarterback was flagged for throwing past the line of scrimmage, and the Chargers settled for a field goal that made it 10-all at halftime.
A drive in the second half stalled after receiver Keenan Allen was flagged 15 yards for taunting, and the Chargers defense was penalized four times for offsides.
Chargers CB Johnny Patrick missed the second half with a head injury. ... Dolphins CB Dimitri Patterson left the game in the first half when he aggravated the groin injury that has bothered him for much of the season. ... The Chargers have lost seven in a row in Miami since their memorable 41-38 overtime playoff victory in January 1982.
Tom Brady trade adds new wrinkle to Boston-Tampa Bay rivalry
While Brady' Bucs won’t face the Patriots in 2020, there’s been enough acrimony in other sports to support a rivalry.
Mike Clay's updated top 240 dynasty fantasy football rankings
Mike Clay offers his updated top-240 rankings for dynasty leagues.
Famed New Orleans Saints kicker Tom Dempsey has coronavirus
Former Saints kicker Tom Dempsey has tested positive for the coronavirus. The 71-year-old famously kicked a then-record 63-yard field goal in 1970.
Coach Sean Payton opens up Saints' playbook on Twitter
Saints coach Sean Payton opened up the team's playbook on Twitter, giving his followers a glimpse at the schemes and language behind one of the league's most potent offenses.
Stephen A. has the perfect team in mind for Cam Newton
Stephen A. Smith makes a case for Cam Newton and the Chargers joining forces following his release from the Panthers.
Tom Brady pitched himself to Bucs brass, Tampa Bay GM says
While the Buccaneers were openly interested in signing Tom Brady, Tampa Bay GM Jason Licht said the 42-year-old quarterback gave the Bucs his best sales pitch in their first phone call.