In retrospect, the Los Angeles Dodgers’ 6-5 loss to the Miami Marlins on May 16 was probably the low point of their 2018 season. It was the Dodgers’ sixth consecutive defeat and their ninth in 10; it dropped their overall record to 16-26, then only the fourth-best in their division; and it brought their playoff odds to a season low of 22 percent.

For a team that had won 473 regular-season games over the previous five seasons (the most in baseball during that period), came within a game of winning the World Series last year and was expected to waltz to a sixth consecutive division crown this year, the season’s ugly start was hard to understand or explain. After that loss to the Marlins, L.A. manager Dave Roberts could only reach for Winston Churchill. “When you’re going through hell,” he told the L.A. Times, “keep going.”

Roberts and his team did exactly that. Beginning with a convincing 7-0 win the next day against the same Marlins club that had just beaten them in two straight, the Dodgers promptly rattled off a streak of 22 wins against just nine losses, through games played on June 20, and increased their playoff chances by 37 percentage points — an improvement bested only by the Seattle Mariners over that period.

The team has improved its hitting since May 16, driving its overall weighted runs created plus (wRC+), a catchall offensive statistic, from 94 before that date — meaning the team was 6 percent below league average offensively, on the whole — to 117 since then. L.A. has benefited from a standout performance by the pleasantly alliterative Max Muncy, whose 13 home runs and 163 wRC+ on the season lead the team. It hasn’t hurt, either, that Joc Pederson seems to have recovered from an early season slump and is now contributing as expected.

The starting pitching, meanwhile, has held serve, moving from a 3.37 mark in fielding-independent pitching (FIP) before their recent surge to 3.29 since it began. Even that small improvement was far from a given, of course, because injuries to an astonishing number of Dodger starting pitchers — at least five, depending on how you count it, including the best pitcher in the world in Clayton Kershaw — left the Los Angeles rotation to be held together by a combination of (Alex) Wood and duct tape.

But the real heroes of L.A.’s recent surge — and, to be fair, also some of the key contributors to the team’s early season struggles — have been the men of the Los Angeles bullpen, who have curbed a worrying early season tendency toward allowing home runs, especially late in games, and collectively improved their FIP from 4.40 before the surge (26th in baseball) to 3.17 after it (sixth).

The central player in that turnaround story has been Kenley Jansen, the Dodgers’ star closer who for the early part of the season looked like anything but. Jansen made just five spring training appearances, slowed by a hamstring injury, and his early season numbers were the kind that might make Dodger fans wish he’d stayed on the DL. Since May 16, he’s been lights out: His 1.06 ERA is by four-tenths of a run the best in the game among relievers with at least as many innings.

That improvement has probably helped drive a significant increase in the Dodgers’ success in one-run games after May 16 — 6-3, compared with 4-7 up to that date — which has helped bring L.A.’s actual winning percentage (.521) somewhat more in line with its higher-order winning percentages, which strip out the effects of sequencing and luck often manifested in bullpen meltdowns.

In a sense, none of this is particularly surprising stuff. The Dodgers had a spate of injuries and underperformance early in the season that would sink most clubs, and they still managed to win nearly 40 percent of their games. Now that their bullpen has regained its elite status, their hitters have started hitting for power again (their 35 home runs so far in June are the most in baseball), and their starting pitchers have started to return to the rotation, the Dodgers look more like the club everyone expected them to be early on — and perhaps always were.

Every good team has bad months, after all. Even the 104-win Dodgers of last season had a 25-game stretch in which they went 5-20, at one point losing 11 straight. It’s just that this year’s Dodger slump came at the beginning of the season, when nobody had banked wins to fall back on and every sportswriter in America was looking for a narrative to focus on. The simple and boring story here is probably that the Dodgers weren’t bad at the beginning of this year — they were just unlucky.

It’s now almost July, and the Dodgers’ bad luck appears to be over. They’re heating up just in time for the official start of summer, and in no mood to concede a division title that’s been theirs since before Max Muncy was a glimmer in Dave Roberts’ eye. The early part of the season may have felt like going through hell for Dodgers, but they’ve played themselves out of it.

Check out our latest MLB predictions.