NEW YORK (AP) — Edwin Díaz struck out Gavin Lux on a 102.8 mph fastball to escape a jam in the eighth inning, and the New York Mets beat the major league-best Los Angeles Dodgers 5-3 on Thursday.

Francisco Lindor hit a tying double in the sixth and scored the go-ahead run on a sacrifice fly by Darin Ruf after the Mets were held to one hit in five innings by Clayton Kershaw, who made his first start since Aug. 4.

NL East-leading New York took two of three from Los Angeles, its first series win against the Dodgers since Sept. 3-5, 2011. LA lost consecutive games for the first time since July 25-26 and dropped consecutive games at Citi Field for the first time since July 25-27, 2015.

“They got a really good team,” Díaz said. “We showed them we have a really good team, too. That’s the team we might play in the playoffs.”

Chris Bassitt (12-7) allowed two runs and six hits in six innings for his fifth straight victory, matching his win total from last season with Oakland. He departed after the Mets took a 3-2 lead in the sixth.

New York led 5-2 when Díaz opened the eighth by walking Freddie Freeman and plunking Will Smith. Freeman advanced to third on a warning-track flyball by Max Muncy and scored on Justin Turner’s flyball near the 408-foot sign in center.

“I was a little bit angry because I wasn’t commanding my slider the way I want to,” Díaz said.

After a mound visit from pitching coach Jeremy Hefner, Díaz escaped by whiffing Lux on the hardest pitch of his career and calmly walked off the mound. It was the fifth time in his last 13 appearances that the Mets closer pitched in the eighth inning.

“He’s the best closer in baseball for a reason,” Lux said.

It was only the third run allowed in the last 34 appearances for Díaz, who has converted 19 of 19 save chances in that span.

“I think he realized that he wasn’t carrying the normal torque on his breaking ball,” Mets manager Buck Showalter said. “He almost got hurt on a couple of them. He just decided to go to option B.”

Adam Ottavino followed with a perfect ninth for his third save.

Kershaw returned from a back injury and settled down after a rocky beginning. He struck out six and walked three but was on a pitch count and was pulled after throwing 73 pitches — three more than his simulated game on Saturday in Miami.

“First inning was a little rough obviously, but I’m thankful to kind of bounce out of that and get through five at least,” Kershaw said.

It was the 15th time Kershaw allowed one hit or fewer and third time this season.

Lindor’s single three batters in was New York’s only hit until Starling Marte opened the sixth against Chris Martin (4-1) with an infield single. One pitch after hooking a ball foul down the right field line, Lindor doubled to center field as Marte easily scored.

Lindor stole third on the second pitch of Ruf’s plate appearance, which came Showalter pulled left-handed hitting Daniel Vogelbach from the on-deck circle. After fouling off three pitches, Ruf lifted a high flyball to the left-field corner and Lindor trotted home.

Brandon Nimmo added an RBI double in the seventh when his popup dropped between second baseman Lux and right fielder Mookie Betts. Nimmo then scored on Marte’s single.

“Miscommunication, probably a ball I gotta catch,” Lux said.

Kershaw walked three in a 25-pitch first inning, including Mark Canha with the bases loaded — the eighth bases-loaded walk of the left-hander’s career and his first since 2015. Kershaw then got Jeff McNeil on a popup and retired his final 13 batters.

Chris Taylor hit a two-run single in the second for the Dodgers.

TRAINER’S ROOM

Dodgers: RHP Brusdar Graterol (right elbow inflammation) was placed on the injured list and will get an MRI Friday. … RHP Tony Gonsolin (right forearm strain) will get an MRI Friday and will remain shut down for a few more days.

Mets: C Francisco Alvarez, the club’s No. 1 prospect, was diagnosed with a loose body in his right ankle and a tentative plan is for him to resume baseball activities in three to four days based on his response to an injection. … Rookie 3B Brett Baty underwent surgery for a torn ligament in his right thumb.

UP NEXT

Dodgers: Dustin May (1-1, 1.64 ERA) makes his third start since returning from Tommy John surgery as Los Angeles opens a series Friday against visiting San Diego and RHP Yu Darvish (11-7, 3.41).

Mets: LHP David Peterson (7-3, 3.21) opposes RHP Josiah Gray (7-8, 4.67) of visiting Washington on Friday.

___

More AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP_Sports