The Oakland Athletics acquired left-hander Jon Lester along with outfielder Jonny Gomes from the Boston Red Sox for slugging outfielder Yoenis Cespedes before Thursday's trade deadline, a person with knowledge of the deal said.

The person spoke on condition of anonymity because neither club announced the swap, another blockbuster by A's general manager Billy Beane to win the Lester sweepstakes. Oakland, with the best record in baseball at 66-41, also receives cash from Boston.

Lester was sought by many teams, with Pittsburgh and the Los Angeles Dodgers among them. He is 10-7 with a 2.52 ERA in 21 starts this season. The All-Star originally was scheduled to start Wednesday night for the slumping Red Sox, who instead scratched Lester ahead of the trade deadline.

The A's are determined to take the next step after losing in each of the past two Octobers in five-game division series defeats to the Detroit Tigers. Oakland had an off day Thursday before returning home to begin a weekend series with the Kansas City Royals on Friday night. It's unclear what day Lester would start. Sonny Gray (12-3) is scheduled for Friday, but manager Bob Melvin has discussed the idea of giving some pitchers extra days between outings to keep them fresh in the second half.

For Boston, this marks another big move of a starting pitcher to the Bay Area after Jake Peavy was traded to the San Francisco Giants on Saturday.

Cespedes won the past two Home Run Derby titles at the All-Star game. The Cuban left fielder is in the third season of a $36 million, four-year contract he signed before spring training 2012. Cespedes is batting .256 with 17 homers and 67 RBIs, 26 doubles and three triples.

Bringing back Gomes, a fan favorite who grew up in nearby Petaluma, provides Oakland with a veteran in the clubhouse who proved invaluable during the A's run to the AL West title in 2012. The A's reached the playoffs for the first time in six years.

Beane believes in starting pitching depth, and the A's sure have it. Lester joins Gray, Scott Kazmir and recently acquired Jeff Samardzija and Jason Hammel, each dealt by the Chicago Cubs on July 4.

The 28-year-old Cespedes could provide the last-place Red Sox a middle-of-the-order power boost they need if they want to get back into the AL East race. Boston entered Thursday's play trailing by 10 ½ games, having lost three straight games and eight of 10.

(Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)

More From 97.3 ESPN