BALTIMORE - The Baltimore Ravens finally found a way to win a close game. For San Diego, the wait continues.

Justin Tucker kicked a 39-yard field goal on the final play, and the Ravens overcame another record-setting performance by Philip Rivers in a 29-26 victory Sunday.

It was a costly win for Baltimore: leading receiver Steve Smith tore his right Achilles tendon in the third quarter and is lost for the season. The 36-year-old has said he will retire after this season, his 15th in the NFL.

"What hurts the most is I can't be out there with my guys," said Smith, who had 82 yards receiving to move into 10th place on the career list with 13,932.

Joe Flacco threw for 319 yards and ran for a score to help Baltimore (2-6) snap a three-game skid and hand the Chargers (2-6) their fourth straight defeat.

The Ravens' six losses this season have come by a combined 30 points, and their only win before Sunday came in overtime. And so, as the clock wound down, Baltimore found itself in a familiar situation.

"You know the game is going to come down to that. You just know it," Flacco said. "We don't make it easy."

Tucker's fifth field goal came three plays after a third-down pass interference call against Steve Williams moved the ball 21 yards to the San Diego 22.

The Ravens have a long road ahead if they are to rebound from the worst start in franchise history, but they're hoping this was a start.

"To have our guys come through the way that they did, that's just a wonderful thing," coach John Harbaugh said.

Rivers went 28 for 37 for 301 yards, his franchise-record fifth consecutive 300-yard game. Two of his touchdown passes went to Malcom Floyd, including a 70-yarder.

But for the third time this season, San Diego lost on the game's final play. The Chargers couldn't score in the fourth quarter at Green Bay on Oct. 18, one week after giving up a last-second touchdown against Pittsburgh in a 24-20 defeat.

"It's been tough losing this way," Rivers said. "Whatever the answer to the problem is, we haven't found the answer."

San Diego's losing streak is comprised of defeats of 4, 7, 8 and 3 points. That's one thing, besides a losing record, that the Ravens and Chargers have in common.

"They've been a very similar position as us," San Diego coach Mike McCoy said. "It's another one of those games that comes down to the bitter end."

Bitter for the Chargers, that is.

"I'm not one to say you'd rather get beat 35-0 every week than have close games, because I can't imagine how that would feel," Rivers said. "But I think it does make it tougher when it's like this."

Baltimore went ahead 26-23 with 4:34 to go when Flacco scored on a quarterback sneak to end a concise 38-yard drive that followed a 17-yard punt return by Jeremy Ross.

Rivers began the ensuing drive with a 26-yard pass to Danny Woodhead, and the Chargers pulled even on a 49-yard field goal from Josh Lambo with 2:07 remaining.

But the Ravens answered. One week earlier, and in the opener at Denver, Baltimore came up short with a chance to win in the waning minutes.

Flacco went 25 for 37 and also faced the challenge of handling some off-the-mark shotgun snaps from John Urschel, who replaced injured centre Jeremy Zuttah in the second half.

"My snaps weren't very good," Urschel acknowledged.

In a back-and-forth game, San Diego went up 23-16 in the third quarter when Rivers beat a blitz to connect with Floyd on that 70-yard score. Rivers threw the pass an instant before getting tackled by free safety Kendrick Lewis, who vacated his usual spot deep in coverage to pursue the quarterback.

It was Rivers' longest completion since 2012 and the longest of Floyd's career.

Baltimore responded with Tucker's fourth field goal, a 45-yarder on the final play of the quarter.

Rivers completed 19 of 22 passes in the first half. His second touchdown pass provided the Chargers with a 16-13 lead at the break.

NOTES: San Diego had to play with a makeshift offensive line. LG Orlando Franklin (ankle) was inactive; LT King Dunlap limped off with an ankle problem in the first quarter and was replaced by Chris Hairston, who briefly left the game with a knee injury but returned. Center Chris Watt sustained a shoulder injury and Trevor Robinson subbed for him. ... Zuttah and TE Crockett Gillmore both left with arm injuries for Baltimore.

___

AP NFL website: www.pro32.ap.org and www.twitter.com/AP_NFL