MILWAUKEE -- Ozzie Guillen knows Carlos Lee from their time together with the Chicago White Sox. Now Guillen hopes Lee can provide his typical brand of slugging on the field for the Miami Marlins, and give them some leadership off of it.

The Marlins acquired Lee from the Houston Astros in a trade on Wednesday, sending a pair of minor leaguers to Houston.

The deal was first reported by ESPN The Magazine's Buster Olney.

"It's a huge move, I think, the front office, showing people how much we want to win," Guillen said. "They show how much we care about winning this year, they showed the players that they're willing to do anything to help this ballclub."

The Astros acquired third baseman Matt Dominguez and left-handed pitcher Rob Rasmussen in the deal.

Money details are still unclear, but Houston will absorb all of the $9 million still owed to Lee for the rest of the year other than a prorated minimum salary that is about $250,000, sources told Olney.

"We felt like it was a good time to infuse a veteran, professional, experienced bat into the lineup," Marlins general manager Michael Hill said.

The 36-year-old Lee spent five-plus seasons with the Astros and is hitting .287 with five homers and 29 RBIs this year.

Houston manager Brad Mills removed Lee in the seventh inning of a 6-4 loss to the Pittsburgh Pirates on Wednesday. Lee's locker was already empty by the time the clubhouse opened after the game.

The right-hander gives the Marlins a veteran hitter as they try to get back into the race in the NL East. First base has been a problem for Miami this season, where regular Gaby Sanchez came into Wednesday's game hitting .194 with two homers and 16 RBIs.

Sanchez hit his third homer in Wednesday's 7-6, 10-inning victory over the Milwaukee Brewers, but it wasn't enough. Hill said Sanchez had been optioned to Triple-A New Orleans.

"Unfortunately, first base has not been a productive position for us, and we're looking to upgrade our offensive production at that position," Hill said.

Guillen provided a more harsh assessment of Sanchez's play.