AP Sports Writer

LOS ANGELES (AP) – For the first 11 drives, Ryan Tannehill and the Miami Dolphins did almost nothing right.

On the final two drives of a rainy Sunday in LA, the Dolphins somehow found a way to stay on a remarkable roll that could propel them all the way back to the playoffs.

DeVante Parker caught a 9-yard touchdown pass with 36 seconds to play, and the surging Dolphins rallied for two late scores to spoil Jared Goff’s NFL debut with a 14-10 victory over the Los Angeles Rams.

Tannehill passed for 172 yards in the fifth straight victory for the Dolphins (6-4), who were dominated by the Rams’ defense until their final two chances for redemption. Miami left the Coliseum crowd in disbelief – except for a healthy contingent of fans in aqua-colored jerseys celebrating the Dolphins’ first game in Los Angeles since 1988.

“As long as there is time on the clock, I’m going to believe that we are going to win,” Tannehill said. “I have a lot of faith, and everyone that steps on that field with me, we put in a lot of work and a lot of time. We’ve grown together over the past three months.”

Miami barely kept alive its longest winning streak since 2008, and the future looks bright: None of the Dolphins’ next five opponents currently has a winning record, which means the Dolphins are in prime position to claim their first playoff berth since 2008.

The Dolphins spent the week in California after beating San Diego last weekend, working on that bond away from the distractions of home. But their offense was mostly awful until Tannehill got it moving in the final minutes with big plays from Parker, who had eight catches for 79 yards, and Jay Ajayi, who rushed for 77 yards.

“I don’t even know (how the comeback happened),” Dolphins coach Adam Gase said. “Just nothing was going right for us. We were terrible on offense.”

After Jarvis Landry caught a 10-yard TD pass with 4:02 to play, the Dolphins got the ball right back and drove downfield for Parker’s diving TD reception in the corner. Miami gained 152 of its 240 total yards on the final two drives, leaving the Los Angeles defense heartbroken and furious.

“We played pretty much great the whole day,” Rams defensive end Robert Quinn said. “We kept fighting, but those last six minutes, I think it’s going to haunt us.”

Todd Gurley scored on a 24-yard run in the first quarter for Los Angeles (4-6), but neither team managed much offense until Miami’s late surge.

GOFF’S TURN: Goff went 17 of 31 for 134 yards after finally getting his chance in the 10th game of the season. But the Rams did little between Miami’s two touchdowns, and when Los Angeles got the ball back at its 41 with 29 seconds left, Goff moved the team only 12 yards before throwing an incompletion in the end zone as time expired.

“Felt good,” Goff said. “We’re obviously disappointed with the result there at the end and how things turned out, and how we felt through the whole game and how in control we were. At the end, six minutes left, we just kind of couldn’t put it away.”

The rookie got his first NFL completion on a short pass to fellow rookie Tyler Higbee. Goff showed mobility in the pocket and made a handful of key third-down throws to keep the Rams moving.

“I was disappointed in the outcome of the game, but I think you could see the light,” Los Angeles coach Jeff Fisher said. “There was a light there for (Goff), so we’ll continue to allow him to get ready, continue to progress.”

BEATING THEMSELVES: Fisher called it “one of the most disappointing losses” of his long career.

“To play 3 1/2 quarters of good football and then to let things slip away in the last six minutes was really disappointing,” Fisher said.

Los Angeles took its first double-digit lead at home this season on a 46-yard field goal by Greg Zuerlein in the third quarter. But after Zuerlein missed a 48-yard attempt off the upright with 6:40 to play, the Dolphins finally mounted a scoring drive capped when Landry caught a short pass and his teammates pushed the pile 4 yards into the end zone.

UP NEXT: The Dolphins return home to host struggling San Francisco (1-9). The Rams are at New Orleans for yet another long road trip in a season full of travel.