Updated

Chicago, IL (SportsNetwork.com) - Chris Coghlan looked at ball four in the dirt and the Chicago Cubs walked off with another win over the New York Mets.

Coghlan's bases-loaded walk with one out in the bottom of the ninth inning gave the Cubs a 2-1 win over the Mets on Wednesday night.

Starters Jason Hammel and Matt Harvey dueled much of the night and the Mets -- after losing the first two games of the four-game series -- held a 1-0 lead before Dexter Fowler hit an RBI single off reliever Carlos Torres in the bottom of the eighth inning to tie the score for Chicago.

Anthony Rizzo and Starlin Castro hit consecutive singles off Torres (1-2) to start the ninth and the Mets loaded the bases with an intentional walk to Miguel Montero.

Jeurys Familia replaced Torres and struck out Jorge Soler, but he was wild against Coghlan, throwing four of the five pitches for balls.

"In those situations, you have to really control your emotions because you want to be the guy. Everybody wants to be the guy to drive in the winning run," said Coghlan. "He didn't really give me anything to hit, so I took my walk."

Hammel threw eight strong innings but couldn't pick up his first career win in five starts against the Mets. He struck out six in eight innings and allowed one run on five hits and a walk.

Harvey had nine strikeouts in seven shutout innings, yielding just three hits and two walks. He was coming off a loss to Philadelphia on Friday after winning his first five starts since having from Tommy John surgery.

"We're in a little bit of a rut right now, but obviously everybody goes through that. Tomorrow's the first day to come out of it," Harvey said of the three-game skid.

Addison Russell hit a one-out single off Torres in the eighth, moved up to second on a wild pitch and scored on Fowler's hit to right. Fowler was caught in a rundown and tagged out.

Lucas Duda led off the top of the ninth with a single against reliever Zac Rosscup, who was then replaced by Hector Rondon (2-0). Duda moved up to second base when Wilmer Flores' bunt hit home plate and he was tagged out by catcher Miguel Montero.

The Cubs thought they had a double play after Montero threw to second base but Duda, who needed to be tagged, was safe. It didn't matter. Rondon retired the next two batters to escape.

Hammel pitched out of a bases-loaded jam in the first inning and had retired seven batters in a row before Curtis Granderson hit a leadoff single in the sixth. Daniel Murphy followed with a double and Granderson scored on Michael Cuddyer's groundout to give the Mets a 1-0 lead.

Game Notes

The Cubs have a five-game winning streak against the Mets ... The Mets haven't been swept this season ... Chicago rookie third baseman Kris Bryant was 1- for-4 and is 5-for-10 in the series with two home runs and three RBI.