STANDISH — Trailing 1-0 through four innings, third-seeded Greely needed a spark Tuesday in the Western Class B baseball championship game.

It came with an inning-ending double play that included a Cape Elizabeth runner thrown out at home.

Greely tied it in the fifth inning, then won it by scoring twice in the eighth to defeat the top-ranked Capers 3-1 and capture their second consecutive regional title at St. Joseph’s College.

Greely (14-5) will play Camden Hills (13-7) for the state title at 4:30 p.m. Saturday at St. Joseph’s.

Will Bryant pitched a five-hitter for Greely and led off the eighth with a triple to center field. He scored on Calvin Soule’s sacrifice fly to center. The Rangers added a run when Chaz Reade walked, then came around on a wild pitch, a fielder’s choice and another wild pitch.

“Our defense turned it around,” said Greely Coach Derek Soule. “The offense wasn’t happening for us early. Pitching and defense will always keep you in games. We threw two runners out at the plate. Matt Pisini made a diving catch in right field.”

Bryant proved a workhorse, going eight innings.

“Will has been doing that his whole career,” said Soule of the four-year standout. “He’s 15-2 for his career.”

Bryant said defense has lifted the Rangers all season.

“We feed off things like that,” he said of the double play to end the fourth.

“It was a big momentum shift,” said Cape Elizabeth Coach Andrew Wood.

The Rangers threw out a runner at home in the first after Cape took a 1-0 lead.

In the bottom of the fourth, Tim Brigham led off with a double to right-center. He moved to third on a wild pitch. After an infield pop, Dylan Roberts hit a grounder to Soule at shortstop, who threw to Caleb Normandeau at first for the second out. Brigham broke for home on the play and Normandeau’s throw was scooped by catcher Dylan Fried, who tagged out Brigham.

The Rangers came charging off the field fired up.

“If Cape had scored that run, it might have been tough to come back,” said Greely assistant coach Bob Anthoine. “Dylan did a great job catching it off the ground and making the tag.”

The Rangers then took advantage of a couple of Cape defensive lapses.

Justin Leeman of Greely led off the top of the fifth, reaching when the throw from shortstop on a grounder pulled the first baseman off the bag.

Cape was surprised he was called safe.

Normandeau followed with a single up the middle that got by the center fielder, allowing Leeman to score and make it at 1-1.

Cape struck in the first inning after starting pitcher Nate Ingalls led off with a double to left. He went to third on a fielder’s choice and scored on Brigham’s groundout.

Bryant appeared to get stronger as the game went along.

“My arm felt great going eight innings,” he said. “My curve was working but they hit my fastball pretty well. I didn’t throw a changeup the whole game.”

Greely and Cape split a pair of games in the regular season, each winning on the road.

“The Greely-Cape rivalry has stepped up a notch since I’ve been here,” said Bryant. “We really wanted to take two out of three against them.”

“We had our chances,” said Wood. “(Ingalls) pitched a heck of a game.”

On the safe call at first leading off the top of the fifth, Wood said: “I just wish the first base umpire had asked the home plate umpire. But he said that our first baseman’s foot was off the bag.”

Ingalls, a junior left-hander, went six innings, allowing three hits.