The Chicago Cubs felt they were in the beginning stages of a dynasty three years ago.

The Cubs ended a 108-year drought in 2016 by winning their first World Series since 1908. With a talented young core of hitters, Chicago thought it would be the first of multiple trips to the Fall Classic.

But the Cubs haven't returned to the World Series, and this year they will miss the playoffs for the first time since 2014.

The collapsing Cubs were eliminated from playoff contention shortly before losing their eighth straight game, falling 4-2 to the Pittsburgh Pirates on Wednesday night.

Back-to-back wild pitches by David Phelps in the eighth inning enabled Pittsburgh to score the winning run. Just before Phelps' bout with wildness, Milwaukee clinched the second NL wild card with a 9-2 victory at Cincinnati.

"Any time you don't go to the postseason it's a weird feeling," Cubs starter Jon Lester said in a quiet clubhouse. "We just flat out didn't get it done. Teams played better than us and it (stinks). It really (stinks)."

President of baseball operations Theo Epstein hinted at midseason that he might make major changes to the roster if the Cubs didn't start playing better. That possibility now looms over the franchise.

"Theo and his guys will make those decisions," Lester said. "They might ask for some of the players' input but there's no way you can predict the future. We've got to wait and see what happens."

The Cubs could also be without manager Joe Maddon in 2020, even though he led them to the postseason each of the last four years. His contract expires at the end of the season, and there has been speculation he would not return if Chicago missed the playoffs.

Maddon said before the game that he and Epstein had not discussed his future. Epstein declined to comment on Maddon's status.

"I can't say enough positives about what Joe has done," Lester said. "No matter what happens, if he continues here, it's gravy. If he doesn't, he should be revered (in Chicago) for a long, long time."

The Cubs have four games remaining. They finish the three-game series with the Pirates on Thursday, and then play the NL Central-leading Cardinals — who hold a 1½-game lead over Milwaukee in the division standings — in a three-game series starting Friday night at St. Louis.

"We're not used to this," Maddon said of playing games that only mean something to the opposition. "It's been a while and it's a really non-fun way to end the season."

Phelps entered in relief with the score tied 2-2 and walked Pablo Reyes to put runners on first and second with one out. José Osuna drew a walk from Brad Wieck (1-2) before scoring on the wild pitches, and Erik González added a sacrifice fly.

González was 3 for 3 with two RBIs as Pittsburgh won for the second straight night over the Cubs following a nine-game losing streak.

Michael Feliz (4-4) pitched a scoreless eighth inning and Keone Kela worked the ninth for his first save of the season. Kela has taken over as closer after All-Star Felipe Vázquez was arrested and jailed last week on felony charges including sexual assault of a minor.

Ian Happ homered and drove in both Cubs runs.

Both starters, Lester and Pirates rookie Dario Agrazal, pitched six innings and allowed two runs.

Happ's homer leading off the seventh pulled the Cubs into a 2-2 tie and chased Agrazal.

"It's my last outing of the season and I wanted to finish strong," Agrazal said through a translator.

EPSTEIN STAYING PUT

Epstein said he has no plans of returning to the Boston Red Sox.

Speculation in Boston has centered on Epstein possibly replacing Dave Dombrowski, who was fired Sept. 8 as the president of baseball operations. Epstein is finishing his eighth season as the Cubs' president of baseball operations.

Epstein oversaw Boston's baseball operations for eight seasons from 2003-10 before leaving to join the Cubs. The Red Sox won the World Series in 2004, their first title since 1918, then won again in 2007.

HURDLE COMING BACK

Pirates manager Clint Hurdle said he has received assurances from team management that he will return next year for his 10th season. There was some question about Hurdle's job security with the Pirates assured of their first last-place finish in the NL Central since 2010.

"Every conversation I've had with (general manager) Neal (Huntington) is how we come back and get better, and anybody in the organization," Hurdle said. "So, my mindset is I want to come back. I plan on coming back. The opportunity for us to improve and get better is important to me, as well as everybody I've had conversations with."

TRAINER'S ROOM

Cubs: 3B Kris Bryant (sprained right ankle) and SS Javier Báez (fractured left thumb) will not play again this season.

Pirates: OF Bryan Reynolds left in the first inning with right hamstring discomfort after being injured while trying to beat out a grounder. ... All-Star 1B Josh Bell (strained left groin), CF Starling Marte (sprained right wrist), C Elias Díaz (sprained right knee) and INF Cole Tucker (strained left knee) have been declared out for the season. ... RHPs Chad Kuhl and Edgar Santana, both recovering from Tommy John surgery, have thrown two-inning simulated games at instructional league camp in Bradenton, Florida.

UP NEXT

Cubs: LHP José Quintana (13-8, 4.55 ERA) will start Thursday night. Quintana has pitched a combined 8 2/3 innings and allowed 16 runs in his last three starts, though he did not factor in the decision in any of them.

Pirates: RHP Joe Musgrove (10-12, 4.49) is 2-0 with a 2.86 ERA in his last four starts.