ATLANTA — The Chargers could have lost just as easily as they won Sunday at Mercedes-Benz Stadium. They should have lost if not for a misfiring opposing quarterback. They would have lost if it weren’t for several sticky-fingered defensive backs, who saved them from themselves.

Could have, would have, should have.

Didn’t.

In most respects, the Chargers’ 17-13 victory over the Atlanta Falcons simply didn’t add up. Their offense failed to click with the frequency necessary to capitalize on the Falcons’ many turnovers, flubs and miscues. Their defense looked like it might get run over for the second straight game.

Somehow, some way, the Chargers found a way to win for the fifth time in six games and the eighth time in 12 games overall, cementing their status as a likely playoff team. They are perfectly imperfect in many ways, but depth and resourcefulness are not two of them, as Sunday’s game proved.

“It’s a beautiful thing, it’s coming together,” coach Jim Harbaugh said.

It took four interceptions, three field goals and a two-point conversion to overcome the Falcons. It was hardly a masterpiece and certainly nothing to send next week’s opponent, the two-time defending Kansas City Chiefs, into panic mode going into next Sunday night’s game.

Rookie cornerback Tarheeb Still intercepted Falcons quarterback Kirk Cousins twice, returning the second one 61 yards for what proved to be the winning touchdown. Marcus Maye and Derwin James Jr. also picked off Cousins, with James’ interception sealing the deal with 40 seconds remaining.

“Great defense wants to be on the field, you know what I mean?” James said after handing the Falcons (6-6) their third consecutive defeat after they started the season 6-3. “I feel like we had that talent (Sunday) and we finished how we wanted to finish (Sunday) as a defense.”

Still’s second and third career interceptions set the tone for a second half in which the Chargers’ defense bent but did not break. He said he couldn’t remember the last time he returned an interception for a touchdown, but was sure it didn’t happen while he was a standout at Maryland.

“Swag, confidence, he gave me energy,” James said of Still.

It was difficult to imagine what Cousins was thinking on a fourth-and-5 play from the Chargers’ 40-yard line, with the Falcons leading 10-9 after the first of two field goals by Younghoe Koo. Cousins delivered a strike to Still, who had nothing but green artificial turf in front of him for the Chargers’ lone touchdown.

Wide receiver Joshua Palmer hauled in a two-point conversion pass from Justin Herbert to make it 17-10 with 1:39 remaining in the third quarter. Harbaugh would later say it was as important as any play the Chargers’ offense made during a game in which they had only 187 total net yards.

“When our best was needed, we got our best,” Harbaugh said.

Cameron Dicker kicked field goals of 45, 51 and 34 yards in the first half, the last of which gave the Chargers a 9-7 lead with 58 seconds left before halftime. Dicker’s 51-yarder, with 11:08 left in the second quarter, was his eighth successful kick in nine attempts from 50 yards or longer this season.

Rookie Ladd McConkey proved to be Herbert’s favorite target in the first half, the only receiver to get open consistently. Herbert targeted McConkey nine times and connected with him eight times for 105 yards. Herbert completed 11 of 15 passes for 115 yards in the first half, driving the Chargers for three field goals.

McConkey broke Keenan Allen’s rookie record for receiving yards in the first half of a game. Allen had 104 yards receiving in a game against the Kansas City Chiefs in Week 12 of the 2013 season. It was McConkey’s third game this season with 100 more receiving yards in a game.

Herbert finished 16 of 23 for 147 yards, the second consecutive game he failed to throw a touchdown pass. He was sacked five times. McConkey caught nine passes for 117 yards, but was sidelined by game’s end because of a knee injury. He has battled hip and shoulder injuries this season, as well.

“It felt good to get the win,” said McConkey, a second-round draft pick from the University of Georgia who played his first NFL game in his home state. “It didn’t matter how many catches or whatever, if we didn’t get the win it still would have been a long flight home. That was the biggest thing.”