Mets third baseman David Wright approaches the mound as relief...

Mets third baseman David Wright approaches the mound as relief pitcher Jeurys Familia reacts on the mound after he threw a wild pitch that allowed San Francisco Giants' Hunter Pence to score in the seventh inning at Citi Field on Monday, Aug. 4, 2014. Credit: AP

The electric young duo of Jenrry Mejia and Jeurys Familia has transformed the Mets' bullpen, making a previously leaky mess a formidable unit. It's one of the reasons that the Mets -- however flawed -- have lingered on the fringes of contention.

For Mejia and Familia, dominance has become the standard. Before Monday, they had gone all season without allowing a run in the same game.

But that stretch came to an end against the Giants, who beat the Mets, 4-3, by tying the score against setup man Familia and winning it against closer Mejia.

"They're not perfect," said Mets manager Terry Collins, who was ejected after the seventh inning for arguing balls and strikes. "They're going to have a hiccup here and there. Today was that hiccup."

Familia, 24, brought a 1.81 ERA into his 53rd appearance of the season. He had not surrendered an earned run in 13 appearances since June 30.

Mejia, 24, had been nearly as good, posting a 2.05 ERA in 30 games since May 17. He had not allowed a run in eight appearances since July 7.

But both played key roles in a loss that dropped the Mets (53-59) to 3-4 on their homestand. They begin a seven-game road trip Tuesday against the NL East-leading Nationals, whom they trail by eight games.

"Not every day is going to be good," said Mejia (5-4), who surrendered what proved to be the winning run with two outs in the ninth on Pablo Sandoval's RBI ground-rule double down the leftfield line. Sandoval also had a tying two-out, two-run double in the third off Mets starter Dillon Gee.

Later, Mejia complained of mild stiffness in his back, though he insisted it didn't hinder his performance. "It's OK," he said. "Just a little bit tight."

Perhaps fresh after a rare day off, Daniel Murphy twice played a role in giving the Mets the lead.

In the first, Murphy bashed his ninth homer of the season, a two-run shot against Tim Hudson. And after Sandoval tied it, Murphy helped the Mets answer with a two-out rally in the fifth. He singled, stole second and went to third on Buster Posey's errant throw, putting himself in position to score on David Wright's infield single.

With a 3-2 lead after six innings, Collins put the game in the hands of Familia, who had held opponents to a .159 average in his previous 13 appearances. He was an easy choice to get six outs but managed only one -- on a brilliant play by Juan Lagares, who threw out Gregor Blanco at the plate on a single by Sandoval.

Hunter Pence, who went 6-for-18 with two homers, two triples, two doubles and seven RBIs in the four-game series, led off the seventh with a triple when Chris Young and Lagares converged and attempted leaping grabs against the wall in left-center. Neither gloved the ball.

Familia, whose command had been sharp, geared up in an attempt to strike out Blanco but walked him instead.

With Posey up and none out, Familia's most costly mistake came when he bounced a fastball past Travis d'Arnaud, allowing Pence to score the tying run. After Posey walked, only Lagares' throw on Sandoval's single prevented Familia from giving up a second run.

"I think I had my stuff," he said. "I just had a bad day that everyone can have."

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME