Dodgers acquire Hanley Ramirez from Marlins.

The Dodgers have acquired infielder Hanley Ramirez and left-handed reliever Randy Choate from the Miami Marlins for pitcher Nathan Eovaldi and minor-league pitcher Scott McGough.

Ramirez, 28, was the National League Rookie of the Year in 2006, when he hit .292/.353/.480 (BA/OBP/SLG) with 17 homers and 59 RBIs. He hit a career-high 33 home runs in 2008 and won a batting title the next season, hitting a career-high .342.

Between injuries and poor play, however, Ramirez wore out his welcome in Miami. In 2011 Ramirez missed the final two months of the season with a shoulder injury; he also missed two weeks in June with a lower back strain. His stats suffered too: a .243 average, .333 on-base percentage, .379 slugging percentage, 10 home runs and 45 RBIs were all career lows. Ramirez’s stolen bases have also plummeted from 51 in 2006, to 20 in 2011, and 14 this year.

But he gives an immediate boost of power to a Dodgers team that ranks last in the majors in home runs (60). Ramirez’s 14 home runs and 47 RBIs both ranked second on the Marlins; only Matt Kemp has hit as many home runs and only Andre Ethier has more RBIs among the Dodgers. Ramirez is batting .246 this season, mostly out of the second or third spot in the order.

A shortstop in his first six major-league seasons, Ramirez switched to third base this season after the Marlins signed veteran shortstop Jose Reyes last winter. Ramirez’s eight errors are the ninth-fewest among everyday major-league third basemen.

Ken Rosenthal of Fox Sports, quoting Marlins owner Jeffrey Loria, wrote on his Twitter account: “It’s no secret I love the kid. He needs to have a fresh beginning, a new beginning. This is a very painful moment for me. But we had to do something.”

Earlier Tuesday, USA Today reported that both the owner and Miami manager Ozzie Guillen wanted Ramirez traded.

Choate, 36, joins his fifth team in a 12-year major league career. He is tied for 19th in the National League in appearances (44) and has held left-handed hitters to a .150 batting average this season while not allowing a home run.

Eovaldi was 1-6 this season with a 4.15 earned-run average. The right-hander filled in adequately as the Dodgers’ fifth starter when Ted Lilly went on the disabled list in May. Four of his first five starts were quality starts (2.35 ERA), but only one of his last five were (6.31 ERA). Still, at 22 and blessed with a mid-90s fastball, Eovaldi had to be an attractive commodity on the trade market.

The Marlins, losers of six of seven, only recently became sellers. The Dodgers had been looking to bolster the left side of their infield and the middle of their lineup, and Ramirez fills both needs.

Ramirez would logically go to third base, where the Dodgers do not view veterans Jerry Hairston Jr. or Adam Kennedy as a long-term solution, and Juan Uribe (.190/.250/.293) has been a disappointment all season. But Ramirez’s experience at shortstop — 829 career games — makes him an option there in case Dee Gordon or his injury replacement, Luis Cruz, don’t work out in the long term.

Ramirez is signed through 2014 in a contract that pays $15 million this season, $15.5 million next season and $16 million in 2016.

Most of the recent buzz surrounding the Dodgers involved a starting pitcher, Ryan Dempster of the Chicago Cubs, and it’s possible they could still get Dempster or someone else in a trade before Eovaldi’s scheduled start Friday in San Francisco. The non-waiver trade deadline is Tuesday. If not, the Dodgers could turn to Stephen Fife, who was impressive in his six-inning major-league debut July 17 against the Phillies.

Dempster, according to reports, wouldn’t approve a trade that would have sent him to the Atlanta Braves this week because he prefers to be traded to the Dodgers.

The Dodgers don’t want to part with 20-year-old pitching prospect Zach Lee. On Tuesday, they didn’t have to while acquiring possibly the best available third baseman on the market.

McGough, 22, was 3-5 with a 3.99 ERA at Single-A Rancho Cucamonga. He was a fifth-round draft pick out of the University of Oregon in 2011.