MIAMI (AP) -- When Florida Marlins slugger Hanley Ramirez learned only minutes before the trade deadline that the team had added a hitter, he threw a fist, grinned and shouted, "Yeehaw!"
It's fair to say Nick Johnson will be warmly received by his new teammates. Florida acquired the first baseman and cash from the last-place Washington Nationals for a pitching prospect, left-hander Aaron Thompson. The deal was completed minutes before Friday's 4 p.m. EDT deadline for making trades without waivers.
Ramirez wasn't the only one pleased with the news in the Florida clubhouse.
"It's going to be a huge pickup for us," second baseman Dan Uggla said. "We're about the last team to make a move. At least we made one. It can only be a positive."
The Marlins have the lowest payroll in the majors and are always to reluctant to part with prospects, but a recent stretch of seven wins in eight games left them in the thick of the NL wild-card race and in the market for an upgrade.
"We wanted to try to add to this team," said Larry Beinfest, president of baseball operations. "We believe in the guys we have here."
The Nationals were willing to part with Johnson because he's in the final season of a three-year, $16.5 million deal. Acting Nationals general manager Mike Rizzo said the team talked with Johnson's agent about an extension and decided it wouldn't work out.
"Nick is an outstanding ballplayer," Rizzo said. "It was a better move for us, in the organization's mind, to trade him, get the prospect we want for him, then to decide over the winter whether to go after him free agent-wise."
Johnson was the last Nationals player who had been with the franchise when it was based in Montreal. He was preparing for Washington's game at Pittsburgh shortly after the trade deadline when he learned of the deal.
"Four o'clock, I went into the cage and didn't think anything of it," Johnson said. "Then I got the tap on my shoulder."
With the deal he gained 21 games in the NL East, leaving a team that has baseball's worst record for the second year in a row.
"We went at it hard every day," Johnson said. "I know we didn't win a lot of games, but we pushed forward and competed and had a good time."
For the next two months he gives the free-swinging Marlins a patient hitter and run producer. He'll bat second, just ahead of Ramirez, the NL batting leader.
"He can help us smooth out some of the inconsistencies with our offense," Beinfest said. "He is a contact guy."
The injury-prone Johnson, 30, missed the 2007 season due to a broken leg and played in only 38 games last year because of a wrist problem. He has stayed healthy this season, batting .295 with six homers, 44 RBIs and a .408 on-base percentage in 98 games.
He's expected to be in the Marlins' lineup Saturday night against the Chicago Cubs.
"I've liked Nick Johnson for 10 years," Florida owner Jeffrey Loria said. "He's a special player. Putting him into this equation makes it very interesting."
To create room for Johnson, Jorge Cantu will move from first base to third, the position he played last year. Emilio Bonificio will become a "super utility guy" with spot starts at second base, third, shortstop and left field, Marlins manager Fredi Gonzalez said.
For Washington, Adam Dunn takes over at first base. The Nationals also sent left-handed reliever Joe Beimel and cash to Colorado for two minor league pitchers, right-handers Ryan Mattheus and Robinson Fabian. Like Johnson, Beimel can become a free agent after this season.
Rizzo said the trades help the organization's strong inventory of pitching. Thompson, a first-round draft pick in 2005, went 5-9 with a 4.11 ERA in 20 starts for Double-A Jacksonville this season.
"We are in the building process," Rizzo said. "We are not rebuilding. This is a team that is, in my opinion, not far away from being a good, solid baseball team. ...
"I understand we've got holes to fill, we've got a lot of work ahead of us this season, this offseason and through spring training. But I feel like we're prepared for it, we're going to get it right, and I do not believe that this needs total rebuilding."
The Marlins made room for Johnson on their 40-man roster by designating shortstop Andy Gonzalez for assignment.
AP Sports Writer Howard Fendrich in Washington and AP freelance writer Chris Adamski in Pittsburgh contributed to this report.