NEW YORK (AP)One of the only trouble spots for the New York Mets this season has been keeping their pitchers healthy.

Finding ways to win, however, hasn’t been a problem.

Mark Canha hit a two-run homer and the Mets threw out the potential tying run at the plate in the ninth inning Thursday night to preserve a 5-4 comeback victory over the scuffling Milwaukee Brewers.

After both starting pitchers exited with injuries in the middle innings, the Mets took advantage of a costly error by first baseman Rowdy Tellez to score the go-ahead run in the eighth.

J.D. Davis led off with a single against Brent Suter (1-1) and dashed to third when Tellez – Davis’ high school teammate – fielded Luis Guillorme’s grounder and made a wild throw into left field trying to get a force at second.

”It was a play that I make 1,000 out of 1,000 times and I got lazy and I cost my team the win,” Tellez said. ”And that’s something that I’m going to have to roll with. I messed up.”

One out later, pinch-runner Starling Marte scored from third on Nick Plummer’s RBI groundout when Tellez threw to second and got the force this time.

Hunter Renfroe singled to start the ninth against Mets closer Edwin Diaz. After a strikeout, pinch-hitter Tyrone Taylor looped a soft double into shallow right field and Renfroe tried to score all the way from first.

Plummer tracked down the ball at the low retaining wall and made a one-hop throw to first baseman Pete Alonso, who relayed to catcher Tomas Nido in time for him to tag Renfroe in the face as he slid by.

”Really stoked that we made the play in time,” Alonso said. ”That was huge, and then Sugar did his job shutting the door.”

Brewers manager Craig Counsell said he thought third base coach Jason Lane made the right call in sending Renfroe – even with one out and Christian Yelich up next.

”You’ve got to go. In their mind, they’ve got to go,” Alonso said. ”Renfroe, he’s a really good baserunner. He was hauling around the bases and at that point you’ve got to do whatever you can to tie the game.”

With Taylor on third, Diaz struck out Yelich for his 13th save.

”We got lucky there because then I’ve got to face Yeli with one out, man on second and the situation changes,” Diaz said. ”Two outs I said, `This game’s mine,’ so I just made my pitches.”

Drew Smith (1-1) worked a scoreless eighth. Jeff McNeil and Nido had RBI singles for the Mets, who erased a 4-1 deficit and improved the National League’s best record to 42-23.

Yelich hit a leadoff homer in a four-run fourth for the Brewers that included Omar Narvaez’s two-run single. Milwaukee lost two of three in the series and has dropped 10 of 12 overall.

”It’s my fault we lost,” Tellez said.

Mets right-hander Tylor Megill left in the fourth with right shoulder discomfort. It was his second start since spending four weeks on the injured list with right biceps inflammation.

”Pretty curious to see what it is,” said Megill, the rotation replacement for injured ace Jacob deGrom. ”It’s very strange. It’s more so in the deceleration and not the actual throwing itself.”

Megill will have an MRI on Friday.

”We’re hoping to get lucky there,” manager Buck Showalter said.

Canha’s homer off left-hander Aaron Ashby in the fifth tied it 4-all. One batter later, Ashby was removed as a precaution because of left forearm tightness.

”Felt like I could’ve kept throwing,” he said.

TRAINER’S ROOM

Brewers: RHP Brandon Woodruff, experiencing numbness in his three middle fingers due to Raynaud’s syndrome, is scheduled to throw about 50 pitches in a rehab start Saturday for Triple-A Nashville. Counsell said Woodruff will need multiple rehab outings before rejoining the rotation. … RHP Trevor Gott (right groin) is scheduled to throw the first of multiple bullpens in Cincinnati this weekend.

Mets: 3B Eduardo Escobar was unavailable. ”Non-workplace event, is the way they put it,” Showalter said. ”We’ll see how he is tomorrow. That’s all I can really say, legally.” … Marte (bruised right forearm) was out of the starting lineup after getting hit by a pitch Wednesday night. He said he should be back Friday. … RHP Max Scherzer threw 50 pitches in a simulated game as he recovers from a left oblique strain. If he keeps feeling good, the three-time Cy Young Award winner plans to make a minor league rehab start next Tuesday – and it’s at least possible he could return to the Mets after that. … C James McCann (left hamate fracture) went 0 for 4 with three strikeouts and caught six innings for Double-A Binghamton in his first rehab game.

BABY ON BOARD

Brewers All-Star closer Josh Hader and his wife, Maria, welcomed their first child Wednesday, named Lucas Alexander. Hader is on the paternity list and expected to miss another day.

UP NEXT

Brewers: LHP Eric Lauer (5-2, 3.36 ERA) starts Friday at Cincinnati against rookie RHP Hunter Greene (3-7, 5.10) in the opener of a three-game series. Lauer was roughed up for eight runs, equaling his career high, and seven hits over five innings last Saturday in an 8-6 loss at Washington.

Mets: RHP Carlos Carrasco (7-2, 3.93) pitches Friday night against Miami in the opener of a four-game series.

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