FALMOUTH — For a memorable game, Courtney Sullivan put in a memorable performance, leading Greely High to an 8-3 win over previously undefeated Scarborough in a girls’ hockey game Wednesday night at the Family Ice Center.

Sullivan scored five goals, including a hat trick in the first period. She added one assist.

The Rangers finished the regular season 18-0 and spoiled a chance by Scarborough (15-1-1) to go unbeaten.

“It’s not something we ever really thought about,” Greely Coach Nate Guerin said. “We didn’t talk about it until we got to tonight.”

Greely became the third girls’ hockey team to finish unbeaten and untied, following Scarborough (2014) and Cheverus (2010). Both those teams won the state championship.

The Rangers, the No. 1 seed in the North, finished their regular season by beating two of the best contenders, St. Dominic and Scarborough, scoring eight goals in each. Sullivan had four goals against St. Dom’s.

“She’s obviously really skilled,” Guerin said. “The intensity she competes with is beyond anyone else on the ice … She sees the puck and she’s going for it.”

Even in the closing minutes, with a five-goal lead, Sullivan was chasing down a loose puck.

“There’s no off switch,” Guerin said. “And there are not different gears. When the puck drops, she’s on. It’s really cool to see.”

Scarborough Coach Caitlin D’Amour said Sullivan was good but her players need to do a better job defending.

“I’m all about respecting your opponent but you have to be careful how much respect you give,” D’Amour said. “If you give too much, they’ll walk all over you.”

Sullivan said she was fired up because it was senior night. “We’re a really close team and we wanted to win for them.”

As for her five goals …

“A lot of the time my teammates gave me really good passes or set me up. I was just there,” she said.

While Greely enjoyed a rout, Scarborough scored first, Lucy Bogdanovich rebounding a shot at 2:33. But Greely scored the next four goals, the first three by Sullivan.

On a power play, Sullivan scored on a rebound at 4:55 from Maura Verrill and Danita Storey.

Scarborough went on a power play, but Sullivan intercepted a pass. One defender fell and Sullivan flew by the other, scoring the short-hander at 7:31.

At 10:39, Bridget Roberts raced in for a shot and then a rebound. Cormier McKenzie made both saves but Sullivan was there for another rebound and a 3-1 lead.

Kylie Rogers scored on a rebound at 12:12 as Verrill picked up her second assist.

Storey scored early in the second for a 5-1 lead. Sami Shoebottom got her first of two goals for Scarborough, but Erin Molloy tallied for Greely and a 6-2 lead.

Scarborough, which had allowed only 1.5 goals a game, replaced Cormier with Lucca Sterrer. Greely goalie Nica Todd finished with 11 saves.

Scarborough, which will be the South’s No. 1 seed, ends its schedule at Biddeford on Saturday. The playoffs begin next week.