The Giants parted with John Bowker, their Opening Day right fielder, and right-hander Joe Martinez, who has bounced between Triple-A Fresno and the Major Leagues for two years, to get Lopez. Minor League right-hander Daniel Turpen was sent to Boston for Ramirez.

As the Deadline approached, it became apparent that the Giants wouldn't acquire an experienced hitter to bolster their lineup. Teams with that commodity insisted on left-handers Jonathan Sanchez or Madison Bumgarner, whom the Giants refused to deal.

"It was always the same mantra on the other side of the ball, where it had to be Sanchez or Bumgarner," said Giants general manager Brian Sabean, who noted that he and his assistants discussed in excess of 50 players with more than 20 teams. "We just couldn't cover the loss of one of these pitchers."

Toronto's Jose Bautista, the Major League leader with 31 home runs entering Saturday, was said to have aroused the Giants' interest. Talk of acquiring Washington's powerful Adam Dunn remained far-fetched but didn't entirely cease.

The Giants also were known to be discussing a three-way deal with the Toronto Blue Jays and Arizona Diamondbacks, though it was unclear whom San Francisco would receive. Besides Bautista, the Giants had interest in two Jays relievers, left-hander Scott Downs and right-hander Jason Frasor. San Francisco's prize also could have been Arizona second baseman Kelly Johnson, who entered Saturday hitting .277 with 17 home runs and 51 RBIs.

Sabean seemed to be referring to the three-way scenario when he said, "We had one situation that went down to late last night and very early this morning. It just didn't come to fruition. It was kind of an offbeat angle."

With the Giants having led the National League with 149 runs scored during July -- their first 20-win month since September 2000 -- outfielder-first baseman Aubrey Huff suggested that the club doesn't need much hitting help.

"We don't need a bat, if you ask me. We've got problems getting guys in the lineup as it is," Huff said. "Obviously, with the way our bullpen has been hurt, if we were going to make a move, that's what we needed to do and we did."

Chances for more moves exist, though the parameters changed once the Deadline passed. Over the next month, deals involving players on the 40-man roster cannot be made unless the players already have cleared waivers. A player exposed to waivers can be claimed by any team and -- if there are multiple claims -- the player would be offered to the team with the worst record.

At that point, a team has 48 hours to either try to work out a trade with the claiming club or remove the player from waivers. A player can only be pulled back from waivers once, but if he clears waivers either the first or a second time through, a team can attempt to trade him to any club.

With left-handers Jeremy Affeldt and Dan Runzler sidelined by injuries until the third week of August, the Giants sought a lefty who could neutralize opposing left-handed batters. Lopez, 33, fit the profile.

Lopez has limited left-handed batters to a .204 average this year while posting a 2-2 record with a 2.79 ERA in 50 games with Pittsburgh.

"He obviously is having a good year, and that's our acute need," Sabean said.

Lifetime, Lopez is 13-9 with a 4.37 ERA in 393 appearances, all in relief. The Giants will be Lopez's fifth Major League team. He reached the Majors with Colorado in 2003 and also pitched for Arizona and Boston before joining Pittsburgh this year.

Ramirez, 28, has held right-handed batters to a .210 batting average in his five Major League seasons, including .239 this year.

"We have some righties who actually aren't too proficient against right-handed hitters," Sabean said. That group includes Martinez (.429) and Santiago Casilla (.273).

Ramirez was 0-3 with a 4.46 ERA in 44 games for Boston this year, but preceded that with a pair of solid seasons. In 2008, Ramirez went 3-2 with a 2.64 ERA and 70 strikeouts in 71 2/3 innings in 71 games for Kansas City. Opponents hit .222 off him. Last year, Ramirez joined the Red Sox in a trade and finished 7-4 with a 2.84 ERA in 70 appearances.

Ramirez recently endured tightness in his right triceps but reportedly has recovered. He owns a 16-14 record with a 3.55 ERA in 268 career relief apppearances.

Martinez, 27, has been primarily a starter in his six-year professional career, though he has bounced between the rotation and bullpen in his stints with the Giants this season and last. Martinez was 0-1 with a 4.91 ERA in four appearances this year for San Francisco after finishing 3-2, 7.50 in nine games (five starts) with the Giants last season.

Faithful Giants fans will long remember Martinez for the adversity he weathered last year, when a line drive hit by Milwaukee's Mike Cameron struck him in the head, causing a concussion and three tiny skull fractures. Martinez returned to the Giants on Aug. 5 and earned the decision in a victory at Houston.

Bowker's departure ends the Giants' efforts to tap his intriguing power potential. He played his way into a starting role this year by hitting .312 with a team-leading six home runs and 23 RBIs in Spring Training, but was soon eclipsed by Nate Schierholtz and Andres Torres. Moreover, Buster Posey's promotion from Fresno prompted Huff's shift to left field and promised to deny Bowker even more activity.

In 41 games with the Giants this year, Bowker hit .207 with three home runs and eight RBIs. In 51 games with Fresno, the 27-year-old Bowker was hitting .310 with 14 homers, 36 RBIs, a .388 on-base percentage and a .594 slugging percentage.

"We thought we knew enough about Joe and Bowker that it was time to cut the cord in a deal like this," Sabean said.

Turpen, 23, was 5-5 with a 4.09 ERA in 37 relief appearances for Double-A Richmond. A non-roster invitee to Spring Training this year, he had 42 strikeouts in 50 2/3 innings while yielding 55 hits.

Chris Haft is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.