The last thing the Cubs wanted to see in the division series last October was a do-or-die Game 5 against the Giants at Wrigley Field.

Johnny Cueto was slated to start, Madison Bumgarner was ready to pitch in relief, and the ghosts of the Cubs’ past would’ve been lingered in the minds of jittery fans.

There was no need to worry, as it turned out. The Cubs rallied from a three-run deficit in Game 4, scoring four runs in the ninth inning to take the series. Knocking off the Giants, who had won three World Series in five years, served as a launching pad that led to their long-lost championship.

"They’re the standard-bearer for postseason toughness and resilience and everything else," Cubs President Theo Epstein said that night. "To do what we just did in their ballpark is kind of shocking in a way."

Nearly five months later, the shock value still hasn’t completely worn off, and the bitter loss should be on the Giants’ minds the next time the teams meet.

"It wasn’t a tough offseason, it was a tough week, maybe, after that, the way it ended," shortstop Brandon Crawford said. "We had Johnny going in Game 5, and any time we have Johnny going on the mound, we have a good chance. To be able to push it to a Game 5 and really have the momentum going back to Chicago, I felt like we’d have a good chance. It didn’t work out that way."

The Giants are back and figure to contend again with the same core of players and the game’s best manager in Bruce Bochy. After the bullpen meltdown, they went out and added an elite closer in Mark Melancon, hoping their Achilles’ heel has healed along with their bruised egos.

"I don’t think any way of going out in the playoffs is an ideal way," ex-Cubs starter Jeff Samardzija said. "You get that far and you go 162 games of working hard, and any way you go out is going to be heartbreaking.

"But I look at it a little differently. I think we knew where we were at and made the adjustment, and now here we are today. All you can do is put yourselves in those situations to win and have an opportunity. Unfortunately it didn’t work out for us that day, but for all the right reasons — because we were playing a good team."

Photos from Game 4 of the Cubs-Giants series at AT&T Park in San Francisco on Oct. 11, 2016.

Melancon, the veteran Pirates closer traded to the Nationals last summer, was one of three elite closers on the free-agent market, along with the Cubs’ Aroldis Chapman and the Dodgers’ Kenley Jansen. Melancon was the first to sign, agreeing to a four-year, $62 million deal in December.

"I was kind of blown away by these guys," Melancon said of the Giants. "Of course we were all kind of in the same boat."

Jansen wound up with a five-year, $80 million deal, and Chapman scored a record five-year, $86 million deal, making Melancon’s contract a relative bargain.

"(Chapman is) three years younger, so he’s going to get another year on his contract," Melancon, 31, said. "Age goes into it. From an annual average, it’s right where we thought we should be."

The Giants’ Big 4 of Cueto, Madison Bumgarner, Matt Moore and Samardzija compares well with the Cubs’ Jon Lester, Jake Arrieta, Kyle Hendricks and John Lackey, and all they really needed was a reliable late-inning pitcher. Melancon should make Bochy’s job much easier.

"We’ve seen what he’s done," Samardzija said. "When we faced him in Washington in August, he stopped us twice on about 12 pitches each inning, and it wasn’t like there was even any threat. He’s a big pickup, and with those three closers on the market, it was really important to get one of them."

Samardzija, who signed a five-year, $90 million deal with the Giants, has no regrets over missing out on the Cubs party. They offered him a long-term deal in 2014, but when he was adamant about going to free agency they dealt him to the A’s in the deal that netted Addison Russell, a move that already has paid huge dividends.

"With the way we ended, playing them, obviously it was a little bit of tougher pill to take, because you know how close you are," Samardzija said. "When you lose like that, and then they go on to win it, it really puts it into perspective on how really close we were. It was cool being a guy from Chicago and playing on the Cubs and knowing a handful of guys, seeing where they came from (at the start of the rebuild).

"I’m really happy for guys like (Anthony) Rizzo and Travis (Wood). It was cool to see how it ended for them — a complete 180. They worked hard and put together a great series in the World Series. It was one for the ages.

"But that was last year. We’ve kind of turned the page, reset and now will try to do it all over again."

psullivan@chicagotribune.com

Twitter @PWSullivan

Our editors found this article on this site using Google and regenerated it for our readers.