Hanley Ramirez blasted two homers and drove in four runs as the Los Angeles Dodgers rallied to beat Arizona 7-6, becoming the first Major League Baseball club to claim a playoff spot. Thursday\'s contest had its share of ups and downs, just like the Dodgers\' season, as they squandered a comfortable lead then rallied from a three-run deficit for the victory. A.J. Ellis\' leadoff homer in the eighth inning snapped the 6-6 tie, allowing the Dodgers to claim their first division title in four years. \"I want to keep going,\" Ramirez said. \"I think that we\'ve got a couple of more steps to do. We\'ve got to keep working and stay together all the way through to the end.\" Ramirez batted four-for-five Thursday for the Dodgers, who became just the fourth club all-time to go from being in last place on July 1 or later to finishing in first place. The Dodgers, who have the second highest payroll in North American baseball at $216 million, got off to an awful 30-42 start to the season, sparking calls for manager Don Mattingly to be fired. They fell to a season-worst 12 games under .500 on June 21 before they reversed their fortunes by going 58-23 since. That included a monster 42-8 run that was orchestrated in part by the superb play of Cuban defector Yasiel Puig. The team\'s winning streak coincided with Puig being called up from the minors. \"It feels good, it really does,\" said Mattingly. \"I\'m a guy that doesn\'t show a lot of emotion and I really try to keep it even, but this is a great accomplishment for these guys.\" Neither team was retired in order Thursday until Los Angeles reliever Brian Wilson turned the trick in the bottom of the eighth. Closer Kenley Jansen posted his 26th save and helped the Dodgers split the four-game series. The Diamondbacks did all their damage by scoring six runs in the third, quickly wiping away the lead the Dodgers had seized on Ramirez\' three-run homer in the top half of the inning. Arizona opened the inning with four consecutive hits off Los Angeles starter Ricky Nolasco. Nolasco, who pitched five innings Thursday, had gone 3-0 in three previous starts against Arizona this season Back-to-back, two-out doubles by Gerardo Parra and starting pitcher Wade Miley put the Diamondbacks up 6-3. But the Dodgers clawed their way back into it, and Ramirez drew them even in the seventh inning by clubbing leadoff pitch to the gap in left-center field off Chaz Roe. Los Angeles\' Ellis drove Josh Collmenter\'s first pitch in the eighth to the seats in the left. Source: AFP