Tommy Milone pitched into the seventh inning, Yoenis Cespedes hit a two-run homer, and the Oakland Athletics edged the Baltimore Orioles, 3-2, on Friday in the opener of a three-game series.

Milone (13-10), who has won four of his last five starts, was charged with two runs -- one earned -- on six hits over 6 1/3 frames. The lefty walked two and struck out a pair.

"That's the kind of game we've seen him pitch all year," said Athletics manager Bob Melvin. "He bends a little but doesn't break. It was a big-time performance out of him."

Grant Balfour allowed Matt Wieters' leadoff single in the ninth before retiring the next two batters. Catcher Derek Norris then threw out pinch- runner Xavier Avery at second base on a steal attempt to end the game.

Jonny Gomes hit a go-ahead, fifth-inning RBI single for the AL Wild Card- leading Athletics. They have won seven of eight overall and sit three games behind the Texas Rangers in the AL West.

Joe Saunders (2-2) gave up three runs on seven hits over six innings in the loss. He walked two and fanned six.

"Milone pitched a great game. He made some big pitches when he needed to," Saunders said. "We had our chances and just fell a little bit short."

Chris Davis hit a solo homer for the Orioles, who were coming off a sweep of the Tampa Bay Rays.

Baltimore could have grabbed sole possession of the AL East lead with a victory, but instead remained tied atop the division with the New York Yankees, who lost to Tampa Bay earlier Friday.

New York and Baltimore are also tied for the AL's final wild card spot.

The Orioles took a 1-0 lead in the third inning, which began with Manny Machado's single. A pair of fly outs moved Machado to third base and he crossed the plate when Josh Donaldson couldn't come up with J.J. Hardy's grounder to third.

Cespedes, who left Thursday's loss to the Angels with a sprained wrist, responded in the fourth. Gomes led off the frame with a base hit before the Cuban import sent a one-out blast over the fence in left for a 2-1 lead.

Davis answered with a leadoff homer in the fifth and Machado followed with a single before Milone induced a 6-4-3 double play and struck out Nate McLouth to limit the damage.

The Athletics opened the bottom half with three straight hits to go on top for good.

Adam Rosales started the stretch with a double before Coco Crisp and Gomes delivered back-to-back singles for a 3-2 advantage.

The Orioles placed runners on first and second with one down in the sixth, but Lew Ford hit into an inning-ending double play.

An inning later, Pat Neshek relieved Milone with one down and a runner on first. After a walk to Machado, Robert Andino grounded into another O's double play.

Ryan Cook tossed a 1-2-3 eighth to preserve the lead.

Game Notes

Balfour recorded his 18th save of the season ... Milone was facing the Orioles for the first time ... The A's lead the season-series, 4-3 ... Saunders hadn't allowed a home run since being acquired from the Arizona Diamondbacks in late August.