OAKLAND, Calif. -- Yoenis Cespedes hit a two-run homer while playing with a sore right wrist, and the AL wild card-leading Oakland Athletics beat Baltimore 3-2 on Friday night to prevent the Orioles from moving into sole possession of first place in the AL East.
Jonny Gomes hit a go-ahead RBI single in the fifth to back A's rookie Tommy Milone in the opener of a key series between playoff contenders. Oakland (83-61) received a clubhouse visit before the game from pitcher Brandon McCarthy, more than a week after he was struck in the head with a line drive and underwent surgery.
|More on Orioles-Athletics|
|More MLB coverage|
The Orioles (81-63) remained tied atop the division with the New York Yankees, who lost 6-4 at home to Tampa Bay.
Milone (13-10) allowed one earned run over 6 1-3 innings to win for the fourth time in five starts. He induced three double plays, allowed six hits, struck out two and walked two. His 13 wins are an Oakland rookie record.
A's starters have walked three or fewer batters in 43 straight games.
McCarthy, the team's opening-day starter, was hit in the head by a liner from the Angels' Erick Aybar on Sept. 5 and underwent surgery. He was released from the hospital Tuesday.
Gomes had everybody sign a batting helmet for the pitcher with the words "heads up" written on the bill.
Cespedes, the rookie from Cuba, connected for his 19th home run. That gave Oakland 85 homers since the All-Star break.
Cespedes played left field and batted cleanup a day after leaving a loss to the Angels in the fifth inning after injuring his right wrist on a slide.
"I'm going to rest after we get a championship," Cespedes said. "I'm going to be in the lineup every day."
Chris Davis then tied it at 2 when he hit his 26th home run leading off the fifth.
The sellout crowd of 35,067 -- a big turnout for fireworks night -- booed Baltimore starter Joe Saunders (2-2) when he intentionally walked Cespedes in the fifth.
Oakland's bullpen produced another impressive game. After All-Star Ryan Cook struck out two in a perfect eighth, Grant Balfour finished for his 18th save in 20th chances.
Matt Wieters beat out an infield single to start the ninth and Xavier Avery entered to pinch run. Pinch-hitter Endy Chavez struck out swinging, then Mark Reynolds flied out. Catcher Derek Norris threw out Avery stealing to end the 2-hour, 37-minute game.
Saunders allowed three runs and seven hits in six innings, struck out six and walked two. He had a two-start winning streak stopped in his fourth outing since being acquired from Arizona on Aug. 26.
The left-hander is 13-5 in 20 career starts against the A's, but was 4-0 with a 1.16 ERA over his previous four against Oakland with two complete games and a shutout coming into Friday.
The Orioles gave Saunders a lead in the third when Manny Machado scored on third baseman Josh Donaldson's error. The ball hit off of Donaldson's glove arm and popped high toward shortstop Stephen Drew.
Prior to this season, the last time these clubs met after the All-Star break each with records above .500 was Sept. 2, 1992, according to STATS LLC.
Oakland No. 9 hitter Adam Rosales doubled and scored as the A's improved to 52-4 when giving up two or fewer runs.
A's 3B Brandon Inge underwent successful arthroscopic surgery Thursday on his right shoulder to repair the labrum. The operation was performed in Detroit by Dr. Stephen Lemos, the Tigers' orthopedic surgeon. He hopes to be ready for spring training 2013. ... Orioles LHP Troy Patton (right ankle) is scheduled to throw an inning Sunday at instructional league. ... The Orioles still haven't named a starter for Sunday's series finale. LHP Randy Wolf is a candidate. ... RHP Jarrod Parker (10-8) pitches Saturday against Orioles LHP Zach Britton (5-2).