Miami acquired Houston first baseman Carlos Lee and cash considerations for prospects Matt Dominguez and Rob Rasmussen, the team announced following its 7-6, 10-inning win over the Brewers at Miller Park.
According to a source, the Astros are paying all of the remaining nearly $9 million owed to Lee, except for the pro-rated $480,000 minimum salary.
"He's still a dangerous hitter," Marlins general manager Michael Hill said. "He will fit nicely in the middle of our lineup. A proven run producer. We're expecting him to come in and do what he's done throughout his career."
The Astros nearly sent Lee to the Dodgers last weekend and were awaiting his approval on the deal before the Dodgers backed out. Lee has a limited no-trade clause, which means there were 14 teams to which his contract couldn't be assigned. The Marlins were not on his list, so he didn't have a say in the trade.
Lee is expected to join the Marlins and play on Thursday in the series finale against the Brewers.
"I can still do a lot of things in the game," Lee told MLB.com. "I've still got a lot of trust in myself. I'm going to step in there in their lineup and will get a lot more opportunities to hit with that type lineup. It's kind of exciting."
Marlins manager Ozzie Guillen managed Lee on the White Sox in 2004.
"It's a huge move," Guillen said. "I think the front office is showing people how much we want to win. They show how much we care about winning this year. They showed the players they are willing to do anything to help this ball club."
To make room for Lee on the roster, Miami optioned first baseman Gaby Sanchez to Triple-A New Orleans. Sanchez hit a two-out, game-tying homer off John Axford to help the Marlins win Wednesday.
"I think it's a welcomed presence to the lineup, a veteran bat who doesn't strike out very much, so that is good," Marlins left fielder Logan Morrison said. "Seeing Gaby go, that's pretty tough, because he's a great guy. He showed everybody here a lot today. He came in, watched video and heard the Carlos Lee deal was done. So he knew he was out, and he gets a base hit. Then takes him out to tie the game. That shows a lot. I'm glad to call him a teammate."
An All-Star in 2011, Sanchez has struggled this season, batting .202 with three home runs and 17 RBIs.
This will be Sanchez's second stint at New Orleans. He was previously optioned on May 19, and recalled on June 10.
The timing of the trade came on a day Sanchez came up with a couple of big hits.
"How do you explain it? It's not easy," Guillen said. "We win the game like that, and all of a sudden somebody goes down. It's not easy, but that's our job.
"I don't think he should be blaming anybody. He should blame himself. We gave Gaby a lot of opportunities. The reason they made this move is obvious. We were not having that much production from him."
Lee, 36, was removed from the Astros' game against the Pirates after he went 1-for-3. The veteran first baseman had his locker immediately cleared out.
The arrival of Lee comes at a time the Marlins may be without All-Star right fielder Giancarlo Stanton, who had an MRI exam on his right knee on Tuesday. The test revealed "loose bodies" in the knee, and he is listed as day to day.
Stanton is hopeful to play in St. Louis on Friday. But if he isn't ready by the weekend, it is doubtful he will participate in the All-Star Game or the Home Run Derby.
Lee is batting .286 with five home runs and 29 RBIs. In his career, he has 354 home runs.
"He's a great RBI man," Guillen said. "That's what we need. We need a pretty solid guy in the middle of the lineup to take the heat away from the guys. That's the biggest reason we got him."
Even though Lee's numbers are down, Guillen says if players like Jose Reyes and Hanley Ramirez get on base in front of him, he will find a way to get the job done.
"If Reyes and those guys get on base, he will bring those guys in," Guillen said. "He knows how to hit in RBI situations,"
To acquire Lee, Miami parted with two high picks from recent Drafts. Dominguez was the Marlins' 12th overall pick in the 2007 First-Year Player Draft.
A third baseman out of Chatsworth High School near Los Angeles, Dominguez is regarded as a standout defensive player who has had his struggles at the plate. In 78 games with Triple-A New Orleans, the 23-year-old batted .234 with seven home runs and 46 RBIs in 78 games.
When the Marlins moved Ramirez to third base, it blocked Dominguez's path to the big leagues.
Rasmussen, a 23-year-old lefty, was 4-7 with a 3.90 ERA in 16 starts at Class A Jupiter. He was recently promoted to Double-A. The Marlins selected Rasmussen in the second round of the 2010 First-Year Player Draft out of UCLA.
"From my standpoint, the deal we wanted to make was a good deal for both sides," Astros general manager Jeff Luhnow said. "Carlos Lee will help the Marlins. The Marlins are very invested in trying to win quickly and Lee can fit into that equation, and I think that's why they were interested in him. We have a different outlook. We're looking towards the future and we were able to get two players we believe will be a part of our future, and that was too good to pass up."
To acquire an impact bat now, the Marlins decided to part with two prospects.
"They're trying to help us out any way they can," Morrison said. "If that means getting another player who can help us win, then yeah, that's what they're going to do. Hopefully it works out for us. I think we've got to get [Stanton] healthy. If you had him and Carlos Lee, and Hanley starts hitting again, and everybody starts pulling their weight, we will be fine."
Joe Frisaro is a reporter for MLB.com. He writes a blog, called The Fish Pond. Follow him on Twitter @JoeFrisaro. MLB.com reporter Brian McTaggart contributed to this report. He writes an MLBlog, Tag's Lines. Follow @brianmctaggart on Twitter. This story was not subject to the approval of Major League Baseball or its clubs.