Updated

The Miami Marlins acquired veteran slugger Carlos Lee in a trade with the Houston Astros on Wednesday.

The Astros received infielder Matt Dominquez and pitcher Rob Rasmussen in return for the 36-year-old Lee, who was replaced in the field in the seventh inning of Wednesday's 6-4 loss at Pittsburgh. The Marlins also received cash in the deal.

Lee was hitting .287 with five homers, 29 RBI and a .336 on-base percentage for the Astros this season. He has 354 career home runs for the White Sox, Brewers, Rangers and Astros.

The Astros made the move primarily because Lee was in the final season of a six-year, $100 million contract with the Astros. His salary this year is $18.5 million.

"Carlos has been an important part of our team and our community in Houston for almost six seasons and he will be missed," Astros general manager Jeff Luhnow said. "We made this move with an eye towards the future, and are very excited about adding Dominguez and Rasmussen to our talent base. Both players have a bright future."

The 21-year-old Dominguez was the 12th overall pick in the 2007 First-Year Player draft and was hitting .234 with seven home runs and 46 RBI for Triple-A New Orleans.

Rasmussen, 22, was 4-7 with a 3.90 earned run average in 16 starts for Single- A Jupiter.

Dominguez will report to the Astros on Thursday, while Rasmussen joins the squad at Double-A Corpus Christi.