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.
The playoff picture
How would your team's prospects look if the season ended today? See where each team stands in the playoff picture midway through the season. More ...
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.
"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.
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.
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."
NOTES: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.
Copyright 2013 by The Associated Press