The Los Angeles Dodgers clinched the National League West title with a 7-6 road win over the second-place Arizona Diamondbacks, completing a regular-season turnaround that saw them climb out of last place and end up winning the division crown by a comfortable margin.

Thursday night's game at Chase Field in Phoenix was a microcosm of the Dodgers' season, as they found themselves down 6-3 after three innings but stormed back to score four unanswered runs to get the win.

Star shortstop Hanley Ramirez, who has returned to his highest level in 2013 after two disappointing seasons, hit a three-run homer in the top of the third to give the Dodgers the early lead and also connected on a solo shot that tied the game in the top of the seventh.

Ramirez went 4-for-5 for the night to lift his batting average to .351. That is 20 points better than the leading hitter in the National League, the Colorado Rockies' Michael Cuddyer, although, due to various injuries, Ramirez does not have enough plate appearances to compete for the NL batting title.

Both starting pitches were roughed up on Thursday night and lasted just five innings, with Dodgers starter Ricky Nolasco giving up six earned runs and Diamondbacks starter Wade Miley surrendering three.

The Dodgers' relievers, however, put in a stellar performance, giving up just one hit over the final four innings.

Closer Kenley Jansen worked a perfect ninth for his 26th save.

By contrast, Arizona's relief pitchers were unable to hold the lead, allowing two runs in the sixth, one in the seventh and the go-ahead run in the eighth when Dodgers catcher A.J. Ellis hit a solo round-tripper.

Despite their NL-high $214 million payroll on opening day, the Dodgers found themselves in last place - 9.5 games behind the Diamondbacks - with a disappointing 30-42 record prior to the All-Star break.

Since June 22, however, the Dodgers have put up a 58-23 mark, including a 42-8 stretch through Aug. 17 that was the best record for a major league team over a 50-game stretch since the end of World War II.

The playoffs are scheduled to start on October 1. EFE