YORK — Ryan Twitchell pitched a four-hitter and Greely broke open a close game with seven runs in the final two innings as the third-seeded Rangers ousted second-seeded York 11-2 in a Western Class B baseball semifinal Saturday.

Twitchell, a sophomore right-hander, walked two batters in the first inning as York (13-5) grabbed a 1-0 lead but didn’t issue another walk until the seventh. He struck out six, and only one of the York runs was earned.

“I knew if I threw strikes on the mound that the defense would take care of it and the bats would come around eventually,” said Twitchell.

“Once (Twitchell) got settled in you could see he was fluid,” said Greely Coach Derek Soule. “He seemed really relaxed for a kid making his first start in the playoffs. I was really impressed with his composure and how loose and confident he looked.”

Greely (13-5), the defending state champion, will play No. 1 Cape Elizabeth in the regional final Tuesday at St. Joseph’s College.

The Rangers grabbed a 3-1 lead in the second inning. That was enough support for Twitchell, though the game was close until the late innings.

“The game plan was to keep the ball low, hit all my spots and command all my pitches,” said Twitchell. “I can’t get overconfident, but I feel pretty good.”

“(Greely) got all the hits, they got all the seeing-eye groundballs, but the bottom line is Ryan Twitchell went out and did what he’s supposed to do in the Western Maine semis. He threw fantastic,” said York Coach Chuck Chadbourne.

Greely second baseman Justin Leeman collected three hits and knocked in four runs out of the leadoff spot.

“Leeman was locked in today. Leeman is a gamer,” said Soule.

Leeman’s two-run single in the second inning put the Rangers ahead for good.

The score remained 3-1 until the bottom of the fourth, when a throwing error on Sam Johnson’s infield single allowed Cole Merritt to score from second base.

But Greely answered with a run in the fifth, three in the sixth and four in the seventh.

“We want to put ourselves in this position every year. Not getting excited to get in the tournament, now we have to be in the position to expect to get in the tournament and expect to play in an environment like this,” said Chadbourne.

Greely beat York for the third time this season.

“You have a team come down here and beat us three times like they did, they’re the better team,” said Chadbourne.