Updated

Aaron Miles saw a lot of green to his left and decided a slumping team needed a little jolt of electricity.

The Los Angeles Dodger second baseman provided it with a perfectly executed bunt, a small play that led to a much-needed big one as the Dodgers broke out of a lengthy hitting slump in a 10-3 win over the Pittsburgh Pirates on Tuesday night.

"I took a chance," Miles said. "It was a tight game and I gave it a shot. If you give me a chance like that, I'm going to take it every time."

Miles' bunt with two outs and a man on in the sixth extended the inning. Andre Ethier followed with a run-scoring single then Matt Kemp drilled the first pitch he saw from Pittsburgh ace Kevin Correia (5-3) into the center field seats for a three-run homer that took some of the sting out of a bitter loss on Monday night.

The Dodgers unraveled in that one following a controversial call in the eighth that ended with Kemp getting doubled off first when umpires ruled Juan Uribe's sinking liner was caught by Pittsburgh left fielder Jose Tabata.

Uribe and manager Don Mattingly were ejected arguing the call and the Pirates went on to win 4-1.

This time, late in a tight game, the Dodgers didn't leave it up to chance.

Kemp's drive ignited a slumping offense as Los Angeles posted a season-high 15 hits.

"We kept grinding," Mattingly said. "After last night, when things went wrong for us, to turn it around on the next night, it was really big for us."

Ted Lilly (3-3) had little trouble over six innings and Los Angeles won for just the second time in seven games.

The left-hander has received a paltry 2.99 runs of support since the start of the 2010 season, the lowest in the majors. He made sure not to waste a rare offensive outburst by one of baseball's lowest-scoring teams.

"We were pretty tough to stop tonight, and it's really fun out there when our bats are going like that," Lilly said. "The dugout is more fun, and everyone feels a little better about ourselves."

Lilly limited Pittsburgh to two runs on four hits, striking out four.

Andrew McCutchen hit two home runs for the Pirates, who were hoping to give themselves some breathing room after making a rare move above .500 on Monday. Instead, they dropped to 18-18 when Correia ran into trouble in the sixth.

Correia cruised through the first five innings and appeared to be on his way to another clean frame after easily retiring the first two batters in the sixth.

Then the pinpoint control that has fueled his solid start to the season briefly disappeared.

Carroll singled to center and Miles dropped a bunt down the third-base line. Pittsburgh's Brandon Wood let the ball roll, hoping it would go foul.

It didn't, though Mattingly gave all the credit to Miles.

"He was on his own," Mattingly said with a laugh.

Ethier lined a single up the middle just out of the reach of second baseman Neil Walker to put the Dodgers up 1-0. A pitch later, the lead ballooned to 4-0 as Kemp drilled a Correia fastball over the wall in center for his seventh home run of the season.

"(Miles) put a perfect bunt down, kept the inning alive and the three-hole hitter comes up and fists the ball and the cleanup hitter hits a three-run homer," Pittsburgh manager Clint Hurdle said. "It looks good when you draw it up that way."

McCutchen responded in the bottom half with a solo shot to left and Walker added a sacrifice fly to cut the lead to 4-2. But the Dodgers added some insurance an inning later thanks to a little charity by the Pirates.

Rod Barajas doubled with one out, then Jerry Sands smacked the ball back at Correia. The ball caromed off Correia toward first, where Steve Pearce gloved it and tried to flip it between his legs to Correia covering. Correia never saw it and even if he did, he'd have been powerless to grab it as it sailed 20 feet left of the bag.

Barajas scored and Correia hobbled to the dugout, his night over.

Correia's steady presence at the top of the rotation has been a pleasant surprise for the Pirates. But while he's been lights out on the road, things haven't been so good at PNC Park. He's failed to pick up a win in all three of his home starts. Not that the bullpen was any better. The Dodgers added five more runs in the eighth to send the most of the modest crowd home early.

Kemp, Ethier and Barajas had two hits each for Los Angeles, whose 10 runs were the most since putting up 12 in a win over the Chicago Cubs on April 22.

"We'll take a game like this whenever we can get it," Carroll said. "It was good to have a few big innings, it's something we haven't had around here in awhile."

Mattingly has preached patience during his team's slow start. He has called a couple of team meetings — the last in New York over the weekend — reminding his players to not get too worked up over their recent slide. For a night, at least, the Dodgers looked relaxed. Then again, they almost always do against the Pirates.

Los Angeles has dominated Pittsburgh over the last decade, winning 70 percent of the meetings between the two teams and taking every season series between the clubs since 2001.

NOTES: Lilly became the 17th active pitcher with at least 1,500 career strikeouts when he got Matt Diaz to whiff in the first inning. ... Pittsburgh's solid play hasn't exactly led to an uptick at the gates. A crowd of 13,497 watched on Tuesday. ... Los Angeles reliever Blake Hawksworth left with a groin injury after coming in place of Lilly in the seventh. Mattingly said it's too early to tell how long Hawksworth may be out.