PROVIDENCE — It’s the goal of any team to learn a painful lesson or two and still win early in the season.

That’s not what happened to the Providence College Friars on Friday night.

The youthful Friars were presented with a bucket-full of lessons and will now have eight days to learn from them after blowing a 20-point lead and losing to the Massachusetts Minutemen, 79-78, in front of a stunned crowd of 10,427 at the Dunkin’ Donuts Center.

The list of lessons PC had to swallow in one of the worst home losses in years is long.

For one, you can never take your foot off the pedal. Sparked by Luwane Pipkins (26 points) and 15 second-half points on five 3-pointers from Carl Pierre, UMass outscored the Friars, 47-28, in the final 20 minutes.

After living by the 3 in the first half with nine treys, the Friars watched UMass drain six bombs to spark their second-half comeback.

And, finally, you can never turn the ball over in crunch time. But after two turnovers helped erase a 76-72 lead, the Friars appeared shaken. That opened the door for Pipkins to slice to the basket for a go-ahead layup and 79-78 lead with 10 seconds left.

PC coach Ed Cooley chose not to lose his final timeout — a move he later regretted — and when Alpha Diallo’s heavily contested runner slid off the rim, the Friars walked off the floor with a stunned look.

“We gave a game away today. They earned it, but I’m pretty sure we helped give it to them,” said a peeved Cooley. “Credit them. I’m up here bitching and complaining, but they did a good job to win the game. I’m frustrated because I don’t think I did a good job coaching. I have to do a better job coaching when the situation becomes desperate and we lose momentum.”

Diallo led the Friars with 21 points, seven rebounds and five assists but his six turnovers proved costly. Nate Watson added 14 points but he missed six of his 14 free throws and missed two contested shots in the lane in the final minute with the Friars clinging to a 78-77 lead.

The defeat is only the third (58-3) in Cooley’s eight seasons in a non-conference home game. It also is easily the most important win in UMass coach Matt McCall’s two seasons in Amherst.

“We talked a lot about toughness and really challenged them,” McCall said about the 50-32 hole his team was in at halftime. “We just had to do things harder. That was the message at the half; we had to play a lot harder. That (second half) was as good of a half of basketball as we’ve played since I’ve been here.”

The Friars enjoyed one of their smoothest offensive halves of the season as they basically did whatever they wanted on the way to those 50 points. PC shot 54 percent, knocked down nine 3-pointers on 14 tries and received 22 points off the bench.

But that easy offensive flow didn’t continue after halftime. While the Friars hit only 36 percent of their shots, the second half was all about defense. After Pipkins scored 19 of his team’s 32 first-half points, he finally found some offensive friends with the game on the line.

Pipkins scored on a few acrobatic drives to keep UMass within shouting range at 59-48, but then Pierre showed up. PC led, 63-48, when the sophomore from Boston caught fire. He drained three straight 3-pointers.

“Nothing but,” Cooley answered when asked if Pierre’s 3-point shooting showed up on the scouting report. “We obviously didn’t do a good job following our scout.”

PC led, 76-70, with 4:28 left but could not close the door. Fall River’s Curtis Cobb (16 points) scored in the lane and Pierre drained yet another 3-pointer to cut the deficit to 76-75. Cobb then gave the Minutemen a 77-76 lead with 2:25 left.

PC regained the lead on a Diallo hoop but, when Watson missed twice inside in the final minute, UMass had the ball with 26 seconds left in a one-point game.

The Minutemen came out of a timeout and Pipkins sliced right to the basket for a layup and go-ahead score with 10 seconds left. PC came up the floor and David Duke got the ball to Diallo. But as he drove to the rim he was met by three UMass players, who forced a contested miss at the buzzer.

“We haven’t lost too many non-conference games in this building,” Cooley said. “That’s what I’m more [upset] at. Our players have to have that chip when we play at home. You can’t lose at home. I’m absolutely [peeved] at myself for that. I think our fans deserved a better coach today.”

On Twitter: @KevinMcNamara33