BALTIMORE - Jacob deGrom keeps getting the same positive results, no matter where he pitches and regardless of his familiarity with the opponent.

DeGrom took a four-hitter into the eighth inning, Curtis Granderson hit two solo homers and the New York Mets beat the Baltimore Orioles 5-3 Tuesday night to snap a three-game losing streak.

Granderson connected off Kevin Gausman (2-5) on the game's second pitch, providing deGrom a lead he never relinquished. Granderson also homered in the fifth inning for the first-place Mets.

Making his first appearance at Camden Yards, deGrom (12-6) gave up one run, five hits and a walk in 7 2-3 innings. The right-hander struck out six and lowered his ERA to 1.98, second-best in the National League behind the Dodgers' Zack Greinke.

"I just try to go up there and put up zeros and let the rest take care of itself," deGrom said.

The shaggy-haired deGrom is 9-2 with a 1.44 ERA in 16 outings since May 11, and New York has won each of his last seven starts — a run that included his first appearance at Tampa Bay.

"He's one of the best in the game right now. No questions," manager Terry Collins said. "I've talked to too many other managers and he's one of the first guys they ask about."

The only glaring flaw in this performance was a sixth-inning home run by Gerardo Parra.

The Orioles were coming off a four-game sweep of Oakland in which they scored 34 runs, but deGrom rendered their bats silent. He struck out slugger Chris Davis three times and didn't let Adam Jones hit the ball out of the infield.

"He's got a good arm," Orioles second baseman Johnathan Schoop said. "Can throw all four pitches. He's sitting at mid-90s, can reach upper 90s with his fastball. It moves."

New York has won nine in a row against the Orioles dating back to June 2010.

Because a sizable portion of the crowd of 34,068 backed the Mets, deGrom received a loud ovation when he walked off the mound with a 3-1 lead in the eighth.

"It also most felt like we were playing home," deGrom said. "It feels good."

Tyler Clippard entered with a runner on first, and Parra hit a liner to right. Granderson backed up, jumped and caught the ball at the warning track.

After New York added two runs in the ninth, Jeurys Familia entered with two on and one out in the bottom half. He issued two straight bases-loaded walks before retiring Manny Machado on a grounder for his 33rd save, defusing a tense situation.

"One thing you try to do in the dugout is maintain your composure," Collins said. "I could have started throwing some stuff around. I try not to panic."

Daniel Murphy had two doubles and two RBIs for the Mets, the only team in the NL East with a winning record. Despite dropping three straight to the Pirates over the weekend, New York is 11-5 in August.

Following a 46-minute delay, during which the tarp covered the infield in preparation of a shower that never arrived, Granderson hit his franchise-record seventh leadoff homer of the season, breaking a tie with Jose Reyes (2006).

New York went up 2-0 in the third when Wilmer Flores singled and came home on a two-out double by Murphy.

Granderson hit his 22nd homer in the fifth just over the outstretched glove of a leaping Jones in centre field.

Gausman allowed three runs, six hits and a walk in six innings.

STAT PACK

Mets: Granderson has 16 RBIs in his last 16 games. He has 24 HRs versus the Orioles, the most against any team.

Orioles: Baltimore is 9-22 against the Mets, 6-12 at home. ... Schoop committed two errors for the second time in his career.

TRAINER'S ROOM

Mets: RHP Bobby Parnell was placed on the 15-day disabled list with right shoulder tendinitis. He allowed six runs over his previous two appearances while getting only two outs.

Orioles: C Matt Wieters was back behind the plate after missing a week with a right hamstring strain. ... OF Steve Pearce (left oblique) took swings in live batting practice in Florida.

ON DECK

Mets: Noah Syndergaard takes the mound for the Mets on Wednesday night in the series finale. The rookie is 7-1 with a 1.82 ERA at home and 0-5 with a 5.01 ERA on the road.

Orioles: Ubaldo Jimenez (9-7) looks to turn around a trend in which he's allowed 26 earned runs in 31 1-3 innings (7.47 ERA) over his last six starts.