Sophomore Taylor Thompson sank the go-ahead basket with 5 seconds left. Stamford had tied it 28 seconds earlier, when Brandy Fane converted two free throws.
Thompson finished with seven points, 12 rebounds and five steals for the Wildcats (6-3, 5-2), who held an 18-11 advantage in the fourth quarter.
H-T coach Ryan Funck, who received 11 points from Emma Wilson, said senior leaders Sam Dibbell and Taylor Firmalino had fouled out with six minutes to go.
Kimi Freer led the Indians with a game-high 18 points.
H-T is at Windham on Tuesday.
Roxbury 44, Downsville 31
Stacey Sprague scored a game-high 14 points and grabbed a team-best 11 rebounds to lead host Roxbury to a Delaware League win.
Jade Meehan and Shannon Sprague contributed 12 points apiece for the Roxbury, which outscored Downsville, 11-3, in the first quarter. Meehan had nine points in the opening quarter.
Roxbury (5-4, 5-2) hosts Gilboa on Tuesday.
Virginia Gilkeson scored a team-high 11 points for Downsville.