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 a perfect game in the 10th at San Diego.

CUBS 9, REDS 3: 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 at Cincinnati.

GIANTS 4, BREWERS 2: Jarrett Parker hit a go-ahead two-run double in the seventh, Buster Posey hit a sacrifice fly and San Francisco won at home.

PHILLIES 8, MARLINS 0: Mark Leiter Jr. allowed one hit over seven innings, Rhys Hoskins homered and drove in five runs, and Philadelphia rode that rookie tandem to a home victory.

METS 4, DIAMONDBACKS 2: Chris Flexen pitched six effective innings, rookie Dominic Smith homered and host New York ended a three-game skid.

AMERICAN LEAGUE

ORIOLES 8, ATHLETICS 7: Zach Britton’s AL-record run of converting 60 straight save attempts ended when the Orioles’ closer blew a two-run lead and failed to get out of the ninth inning, but Baltimore ultimately beat visiting Oakland in 12 innings.

Baltimore led 7-5 heading into the ninth, but the lefty gave up three straight hits before a sacrifice fly by Matt Joyce tied it for Britton’s first blown save since Sept. 20, 2015, at Tampa Bay.

Manny Machado led off the 12th with a home run off Simon Castro.

YANKEES 10, TIGERS 2: 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 at Detroit.

BLUE JAYS 7, RAYS 6: Kevin Pillar hit Toronto’s sixth home run of the game in the eighth, lifting the Blue Jays to a victory on the road.

INTERLEAGUE

MARINERS 9, BRAVES 6: Taylor Motter replaced an injured Robinson Cano and gave visiting Seattle the lead with a two-run single in the eighth.

NOTES

CARDINALS: Closer Trevor Rosenthal was moved to the 60-day DL and will have Tommy John surgery.

JOE KLEIN, who was a general manager for the Rangers, Indians and Tigers before spending the last two decades as executive director of the independent Atlantic League, died at age 75 after complications from heart surgery.