Pittsburgh Pirates' Josh Harrison (5) is congratulated by teammates after hitting a walk-off home run to beat the Los Angeles Dodgers and break up the no-hitter by Dodgers starting pitcher Rich Hill in the tenth inning of a baseball game, Wednesday, Aug. 23, 2017, in Pittsburgh. The Pirates won 1-0 in ten innings.(AP Photo/Keith Srakocic)
Pittsburgh Pirates' Josh Harrison (5) is congratulated by teammates after hitting a walk-off home run to beat the Los Angeles Dodgers and break up the no-hitter by Dodgers starting pitcher Rich Hill in the tenth inning of a baseball game, Wednesday, Aug. 23, 2017, in Pittsburgh. The Pirates won 1-0 in ten innings.(AP Photo/Keith Srakocic) Credit: ap photographs — Keith Srakocic

Pittsburgh — Dodgers lefty Rich Hill lost his perfect game on an error in the ninth inning, then lost his no-hitter on a leadoff home run in the 10th by Josh Harrison that sent the Pittsburgh Pirates over Los Angeles, 1-0, on Wednesday night.

The Pirates didn’t have a runner until Jordy Mercer led off the ninth with a sharp grounder that smacked off third baseman Logan Forsythe’s glove for an error. Hill retired the next three batters.

Hill (9-5) came back out for the 10th, and Harrison sent his 99th pitch of the night into the first row of seats in left field, just out of the reach of Los Angeles left fielder Curtis Granderson. Hill struck out 10 without a walk.

Hill became the first pitcher since Pedro Martinez in 1995 to take a no-hit try into extra innings. Martinez, then with Montreal, lost his perfect game in the 10th at San Diego.

After Mercer reached in the ninth, Hill quickly retired the next three batters. Chris Stewart laid down a sacrifice bunt, Jose Osuna grounded out to Forsythe and when shortstop Corey Seager gobbled up a grounder by Starling Marte, Hill had held the Pirates hitless for nine innings.

But to get official credit for a no-hitter under Major League Baseball rules, a pitcher must complete the game — going nine innings isn’t enough if it goes into extras. Back in 1959, a Pirates pitcher had perhaps the most famous near-miss of all when Harvey Haddix lost his perfect game and the game itself in the 13th at Milwaukee.

Orioles 8, Athletics 7 (12)

Baltimore — Zach Britton’s AL-record run of converting 60 straight save attempts ended amid the evening shadows of Camden Yards, when the Orioles closer blew a two-run lead and failed to get out of the ninth inning in a game Baltimore ultimately won in the 12th, 8-7 over Oakland.

Baltimore led 7-5 heading into the ninth when Britton entered to seal the victory, just as he had been doing successfully since the final days of the 2015 season. On this occasion, however, the left-hander gave up three straight hits before a sacrifice fly by Matt Joyce tied it.

Following a walk to Khris Davis, Britton was replaced by Miguel Castro (3-1), who quelled the uprising.

Giants 4, Brewers 2

San Francisco — Jarrett Parker hit a go-ahead two-run double in the seventh, Buster Posey hit a sacrifice fly, and San Francisco beat contending Milwaukee.

Hunter Strickland (3-3) pitched the seventh for the victory as San Francisco took the series against a Milwaukee club that had hoped to grab some momentum going into a tough weekend ahead on the road against the L.A. Dodgers. The Brewers began the day 2½ games behind the first-place Cubs in the NL Central, having won six of seven games before arriving at AT&T Park.

Phillies 8, Marlins 0

Philadelphia — Mark Leiter Jr. allowed one hit over seven innings, Rhys Hoskins homered and drove in five runs and Philadelphia rode that rookie tandem over Miami.

Leiter (2-3) didn’t allow a hit until Miguel Rojas doubled to lead off the sixth with a hard chopper that bounded over the head of drawn-in third baseman Maikel Franco.

Mets 4, Diamondbacks 2

New York — Chris Flexen pitched six effective innings, rookie Dominic Smith homered and New York ended a three-game skid, beating Arizona.

Cubs 9, Reds 3

Cincinnati — Kyle Schwarber hit a three-run homer in the ballpark near his home, Tommy La Stella added a two-run shot while subbing for Kris Bryant, and Chicago kept its second-half surge going with a win over Cincinnati.

Yankees 10, Tigers 2

Detroit — Gary Sanchez homered and drove in three runs, and Luis Severino pitched impressively into the seventh inning to lead New York to another lopsided win over Detroit.

Blue Jays 7, Rays 6

St. Petersburg, Fla. — Kevin Pillar hit Toronto’s sixth home run of the game in the eighth inning, lifting the Blue Jays over Tampa Bay.

Mariners 9, Braves 6

Atlanta — Taylor Motter replaced an injured Robinson Cano and gave Seattle the lead with a two-run single in the eighth inning, lifting the Mariners over .

White Sox 4, Twins 3

Chicago — Tim Anderson singled with one out in the bottom of the ninth inning to score Avisail Garcia from second base and give Chicago a comeback win over Minnesota.

Astros 6, Nationals 1

Houston — Alex Bregman hit a three-run homer and Jake Marisnick and Max Stassi added solo shots to help Houston beat Washington.

Cardinals 6, Padres 2

St. Louis — Rookie Luke Weaver struck out 10 in seven scoreless innings, and Kolten Wong had three hits and three runs to help St. Louis beat San Diego.