The Flyers' roller-coaster  season, which featured both encouraging and maddening stages, came to a screeching halt Sunday.

Blame a porous defense and the team's failure to win on home ice.

Blame an offense that, with the Flyers trailing by just a goal, had no shots in the first 11-plus minutes of the third period.

But mostly, blame Pittsburgh winger Jake Guentzel, who scored four goals to power the Penguins to a closer-than-it-looks 8-5 victory at the Wells Fargo Center.

"We were just resilient all night," said Penguins goalie Matt Murray, who was bailed out by his team's offense. "Just a really gutsy effort."

Pittsburgh overcame a 4-2 deficit and won the series, four games to two. The Penguins will face the Columbus-Washington winner in the conference semifinals.

Sean Couturier, who missed Game 4 with a torn MCL in his right knee, had a hat trick and five points in a losing cause.

"It's frustrating," Couturier said after becoming the fifth player in franchise history to register a five-point playoff game. "You're up two goals, you should win the game."

"It's never a good feeling," said Wayne Simmonds, who was hindered by an injury and was goalless in the series. "It's not what we envisioned."

They thought they would take the series back to Pittsburgh for a deciding Game 7 on Tuesday. But the Penguins scored four third-period goals, including an empty-netter, as they pulled away from a 4-4 tie.

"They just keep coming at you," Simmonds said.

"We played well the first two periods," said defenseman Ivan Provorov, who played gallantly with a badly injured left shoulder. "They pressure hard, so we needed to move the puck fast and support each other. That's what we did in the first two periods. In the third period, I had a few mistakes that turned into goals and it cost us the game."

Provorov's injury severely limited his stickhandling and shooting ability, and his turnover led to Guentzel's two-on-one goal that put the Penguins ahead, 5-4, with 19 minutes, 30 seconds left in the third period.

Guentzel tapped in a pass from Phil Kessel, who had taken the puck from Provorov (one hit, minus-4 in a gritty 20:31).

Provorov choked back tears as he talked about the loss. He said he knew he would be limited in what he could do, but "as long as my arm was attached to me, then I was playing."

Pittsburgh scored in the final 54 seconds of the second period, so it had two goals in 86 seconds. Earlier, the Penguins had two goals in a 47-second span, and they added two goals 10 seconds apart in the third.

Trailing 5-4, the Flyers failed to connect on a four-on-three power play midway through the third period. A few minutes later, Guentzel scored two goals 10 seconds apart — the first one was tallied seconds after Kris Letang leveled Couturier, who thought a penalty should have been called — to put the Pens ahead, 6-4.

Earlier, turnovers by Radko Gudas led to a pair of second-period goals that enabled the Penguins to tie the score at 4-4.

"Obviously, you have to take care of the puck, and at times, it didn't work out that way," defenseman Andrew MacDonald said.

The Penguins swept the three conference-quarterfinal games at the Wells Fargo Center. In seasons they reached the playoffs, the Flyers failed to win a home game for just the second time in the last 20 years.

Including the regular season, Pittsburgh won all five games against the Flyers at the Wells Fargo Center, outscoring them, 28-9.

"We didn't play our best at the beginning of the series," Simmonds said.

In the playoffs, the Penguins scored 28 goals (4.67 per game), the most ever allowed by the Flyers in a six-game series.

The Flyers, who had a 10-point improvement over 2016-17, have gone six straight seasons without winning a playoff series. That's the longest stretch in franchise history.

The Flyers seemed in control in the middle period. Couturier, who scored the winning goal in Game 5 despite playing with one healthy leg, gave the Flyers a 3-2 lead by scoring on a strange breakaway, one in which he slowed down at the last second and, as Patric Hornqvist went past him, made a great move to slide the puck past Murray with 19:20 left in the second.

With 7:46 remaining in the second, Scott Laughton's first goal in 28 games pushed the Flyers' lead to 4-2.

"Mur-ray … Mur-ray … Mur-ray," the fans chanted sarcastically.

The Penguins responded, capitalizing on a Gudas turnover and getting to within 4-3 on a slick tic-tac-toe passing play that finished with a Hornqvist goal with 6:25 left in the second.

With 54 seconds remaining in the second, Gudas, who declined to speak with reporters after the loss, committed another costly turnover, leading to a game-tying goal. Olli Maatta's shot from well above the left circle hit the left post and caromed off Neuvirth and into the net to make it 4-4.

Guentzel was battling in front and was credited with the goal, but on the replays he didn't appear to touch it and the tally could be changed.

"We had a 4-2 lead … and made a couple mistakes," Neuvirth said. "They're just too good. They're [too] good to give them those opportunities."

The first period ended in a 2-2 tie.

Feeding off a frenetic crowd,  Couturier charged the net, dug out the puck from a handful of Penguins, and scored just 2:15 into the game. The team that scored first won each of the first five games.

The Flyers swarmed the Penguins' zone and had the game's first five shots and first 10 shot attempts.

But the Penguins, who were missing star center Evgeni Malkin because of an unspecified injury, didn't get rattled. Taking advantage of defensive mistakes by Val Filppula and Shayne Gostisbehere, they scored two goals 47 seconds apart to take a 2-1 lead.

The Flyers tied it on MacDonald's one-time laser from the right point with 4:12 to go in the second. Couturier (who else?) helped set up the goal. Couturier later steered them to a 4-2 lead, but it would vanish.

"Its tough to find positives, but that's a good team on the other side," said Claude Giroux, who had just three points and was minus-10 in the series. "That's the reason they won two Cups in a row. On a positive side, we're going to learn from this and we're going to get better."