Samardzija, acquired a day earlier in a trade with the Chicago Cubs, received several standing ovations. He was cheered during pre-game warm-ups and again after striking out the side in the seventh.

Samardzija gave up one run and four hits. He struck out five and walked one while earning his first win since June 7.

Jed Lowrie had two hits and scored twice, and leadoff hitter John Jaso added a pair of hits and an RBI for the A's, who won their fourth straight following a three-game sweep in Detroit.

Arizona's Wade Miley earned his first win since early May and Paul Goldschmidt hit a two-run homer as the Diamondbacks beat the Braves 3-1 to stop Atlanta's nine-game winning streak.

Miley (4-6) allowed one run on five hits and one walk in 6 2-3 innings. The left-hander was 0-3 in his previous nine starts and had not won since beating the White Sox on May 10. The win snapped his streak of five straight no-decisions.

At Detroit, All-Star David Price came within an out of a complete game as he helping Tampa Bay climb out of last place in the American League East with a 7-3 win over the Detroit Tigers.

The Rays have won three straight and eight of nine to move a half-game ahead of defending champion Boston in the standings. Tampa Bay had sole possession of the cellar for 39 consecutive days.

The New York Yankees beat the Minnesota Twins 9-7 after Jacoby Ellsbury homered, doubled and drove in four runs.

Derek Jeter and Ichiro Suzuki each had three hits for the Yankees, who have won 14 of 18 overall at Target Field.

San Francisco pitcher Tim Lincecum continued his mastery of San Diego taking a shutout into the seventh inning as the Giants won 5-3, while David Lough tripled to lead off the 12th inning and scored off J.J. Hardy's single as the Baltimore Orioles recovered after blowing a five-run lead to edge the Boston Red Sox 7-6.

Corey Kluber allowed four hits and struck out 10 batters in 8 1-3 innings as Carlos Santana and Yan Gomes homered in the Cleveland Indians' 4-1 win over the Kansas City Royals, and the Washington Nationals defeated the Chicago Cubs 2-1 after Ryan Zimmerman's eighth inning single drove in the go-ahead run.

In other games, the Los Angeles Angels downed the Houston Astros 6-1, the Los Angeles Dodgers beat the Colorado Rockies 8-2, the New York Mets defeated the Texas Rangers 8-4 and the Miami Marlins came back to beat the St. Louis Cardinals 8-4.

The Pittsburgh Pirates ran over the Philadelphia Phillies 6-2, the Chicago White Sox blanked the Seattle Mariners 1-0 and the Cincinnati Reds were 4-2 winners over the Milwaukee Brewers.