OAKLAND, Calif. (AP) -- A.J. Griffin glanced into the visiting dugout and saw Derek Jeter, Alex Rodriguez and Mark Teixeira among others. Oakland's rookie right-hander felt some nerves all right.
Then, Yoenis Cespedes hit a two-run homer in the first inning to give him a quick lead and Griffin shut down one of baseball's best lineups for five innings as the Athletics beat the Yankees 4-3 Thursday night to snap a nine-game skid at home to New York.
Griffin already has shown poise in some high-profile moments - meeting the Bay Area rival Giants in his big league debut last month, hanging tough at two-time AL champion Texas his next time out, facing Boston on July 4 and beating the Twins for his first victory last Friday.
''It's fun. I didn't have a choice of who I pitched against,'' he said. ''We're having a lot of fun right now. I like to hear the music after games.''
Through the noise, he turned to Sean Doolittle and said, ''Hey, we just beat the Yankees!''
Seth Smith added a two-run single in the third for the A's, who won for the 11th time in 13 games to move a season-best four games over .500 at 48-44 - the first time the club has been there since it was 28-24 on May 31, 2010.
It was a rare dog day of summer for the Yankees, who still owned the best record in baseball (57-35) after a night in which 718 dogs attended the game as the A's attempted to set a Guinness World Record for most canines at a sporting event. They will submit their total to Guinness.
Cespedes' drive was Oakland's 13th homer in the last six games. The A's snapped New York's three-game winning streak and handed the Yankees just their third defeat in 12 games.
Jeter, Rodriguez and Nick Swisher each had a pair of hits for New York, which swept a three-game series here from May 25-27 and owns a 24-10 record at Oakland since 2004.
A's All-Star closer Ryan Cook surrendered Swisher's one-out homer in the ninth before recovering for his 10th save in 13 chances.
Swisher's 14th homer, against his first team, helped New York extend its franchise-record run of 43 straight games with at least three runs as it opened the four-game series that kicks off a seven-game road trip in the team's final West Coast trek.
The red-hot A's handed Freddy Garcia (4-3) his first loss since April 28 against Detroit.
''I was fighting every pitch. I was in trouble the whole game,'' Garcia said. ''When I threw the fastball they hit and drove in runs.''
Garcia's nine hits allowed in 5 2-3 innings matched his most of the season. He struck out six and walked two.
The right-hander received a call from Mariners ace Felix Hernandez earlier Thursday in anticipation of their matchup Tuesday at Safeco Field.
''He said, 'I'm going to pitch against my idol,''' Garcia said.
Coco Crisp had three hits for an Oakland club that improved to 11-2 in July and opened a stretch of 17 straight games against AL East opponents.
Griffin (2-0) allowed two runs on four hits in six innings, struck out four and didn't walk a batter for the first time in his fifth career start.
After allowing Raul Ibanez's one-out single in the second, Griffin retired the next 11 Yankees in order before Jeter's leadoff single in the sixth.
Rodriguez singled one out later and Robinson Cano followed with a base hit to extend his career-high hitting streak to 22 games. He also has reached base safely in 25 consecutive games since June 20.
Griffin received a mound visit from pitching coach Curt Young, then gave up Teixeira's sacrifice fly and an RBI single to Swisher.
''The kid knows how to locate the baseball,'' Yankees manager Joe Girardi said. ''He changes speeds, works fast and does what he needs to do.''
Jeter singled leading off the game but was later out on a strange force at third. After Rodriguez's one-out single, left fielder Cespedes backhanded Cano's liner then dropped the ball, hesitated and then overthrew third as the baserunners held. Griffin, backing up the bag, retrieved the ball and ran to step on third for the force on Jeter. He threw to second, but Rodriguez made it in time even though he had hesitated between first and second after urging Jeter to go. A-Rod at one point threw his arms up as if to ask what had happened.
A's manager Bob Melvin credited Griffin for having the wherewithal to back up the base.
''There was mass confusion on that play,'' Griffin said.
Yankees special adviser Reggie Jackson rejoined the team and was in uniform after he made comments critical of Rodriguez and other former stars.
Notes: Jeter's sixth-inning run scored gave him 1,822, tying him with Eddie Collins for 15th all-time. ... Yankees LF Brett Gardner will have arthroscopic surgery on his troublesome right elbow next week to remove inflamed tissue, likely ending his season. He was hurt diving for a ball against the Twins on April 17 and hasn't played since. ... Injured New York reliever Joba Chamberlain (ankle) is scheduled to pitch for a fourth time with the Gulf Coast Yankees on Friday. ... Former A's 3B Eric Chavez received a mostly warm welcome when he came to the plate for the first time in the second. ... Not counting canines, the game drew 23,382.