WESTPORT—Considering the Greenwich and Staples boys basketball teams have had the majority of their games decided in the final seconds, there was a good chance that Tuesday’s meeting would come right to the wire.

That’s exactly what happened.

The Cardinals got a stop on the Wreckers’ final possession as time expired, propelling them to a 52-51 win in which they didn’t trail in the final period. The lead was no bigger than four points in the final quarter, though, and had to hold on as Staples had a chance to chance to grab the win.

The Wreckers ran a play with guard Justin Seideman outside the 3-point line, but Greenwich’s Robert Clark got a crucial steal and time ran out.

“This is our eighth game and most of them have been decided between three and four points,” said Greenwich coach Pat Heaton. “We’re used to being in this pressure; sometimes the ball bounces your way and sometimes it doesn’t. Tonight it bounced our way.”

Greenwich (5-3) was in a position to win behind the shooting of Conor Harkins, who scored 30 points. He hit six 3-pointers, including one with 2:28 left to give the Cardinals a 50-46 lead. Harkins had combined for eight points in his last two games.

“He broke out of a slump,” Heaton said. “He came off two games where he scored two and six points. If we can get him and the rest of the team on, we can get something going.”

Wreckers coach Colin Devine felt his team did a solid job defending the sharpshooter, but Harkins made several tough contested shots and a couple more from well behind the 3-point line.

“He’s a first team All-FCIAC player in my book,” Devine said. “I thought we did a pretty good job on him to be honest; he made a lot of tough shots. We tried to deny him the basketball but he did a good job getting in positions to score.”

Staples (3-6) closed strong to keep things close. Sean Pritchett (19 points) hit a layup to make it 50-48 before Seideman (19 points) hit a foul shot to pull to within a point. Greenwich responded with a layup with 50 seconds remaining.

Pritchett scored again to bring the Wreckers to within 52-51 with 18 seconds left. Staples forced a jump ball on the ensuing inbounds pass and the arrow pointed the Wreckers way, setting up for the final play.

Greenwich was agressive with a foul to give in the final sequence, which resulted in a turnover.

“We were lucky we got a steal, I was actually trying to go for a foul,” Heaton said. “We had a foul to give and we were able to take away the ball.”

Seideman scored 12 of his points in the first half, including eight in a row that turned a 14-10 deficit into an 18-14 lead. Greenwich trailed 23-21 entering the break but Harkins scored seven straight to give Greenwich its largest lead of the game.

The result was Staples’ fourth loss by a single possession.

“We’re improving, but we’re not winning,” Devine said. “I think if we keep doing what we’re doing now we’re going to find a way as a coaching staff and as a team to win these close games.”

rlacey@bcnnew.com, twitter.com/ryanlacey11

GREENWICH 52, STAPLES 51

GREENWICH 12 9 18 15 — 52

STAPLES 10 13 13 15 — 51

GREENWICH (5-3): Conor Harkins 9 6-7 30 Kieran Carroll 2 0-2 4 Connor Langan 1 0-0 2; Joey Lanni 0 0-0 0; Mike Gianopoulos 3 1-2 7; Elias Gianopoulos 0 0-0 0 Alexander Brett 1 0-0 2. 17 7-12 52.

STAPLES (3-6): Sean Pritchett 9 1-1 19 Justin Seideman 6 6-8 19 Dylan Dreyfuss 0 2-2 2 Brendan Massoud 0 0-0 2 Jared Vishno 3 0-0 6 Thomas Jones 1 0-0 2 Max Sussman 1 0-0 3. Totals: 20 9-11 51.

3-pointers: G—Harkins 6, Clark; S—Seideman, Sussman.