W.T. Woodson entered Thursday night’s boys’ soccer match with T.C. Williams as one of the hottest offensive teams in the area. It had scored nine goals in its past two games and finally forged an attacking identity with just two weeks left in the regular season.

But misfortune struck the Cavaliers early and often in the first half Thursday as countless scoring opportunities went begging. A corner kick danced across the top of the crossbar. A flashy heel kick nearly handcuffed Titans keeper Edgar Martinez but was eventually saved. Woodson’s marquee player, Michael Cherry, missed a goal by inches after a breakaway.

It wasn’t until the final seconds of regulation that the Cavaliers, down a goal, finally caught their break. After a bizarre play in which the T.C. Williams goalkeeper bobbled a jump ball, Cherry sneaked in behind and tied the game. Bryan Lutz added the go-ahead goal in overtime as sixth-ranked W.T. Woodson earned a 2-1 victory over the eighth-ranked Titans in a thrilling AAA Patriot District game in Fairfax.

“I went crazy. I didn’t know what do to,” Cherry said of his last-second goal, his fourth in three games. “I wasn’t expecting it at all. I expected the keeper to have it. And then when I got it . . . I was just ecstatic.”

The wild finish had major implications for the Cavaliers (9-2, 5-1), who kept their foothold atop the Patriot with the win.

It almost wasn’t so. T.C. Williams (8-3-2, 3-1-1) took charge after Terell Williamson converted a header to make it 1-0 four minutes into the second half, and the Titans looked primed to polish off a Woodson squad that squandered opportunity after opportunity in the first half.

But Cherry, who is known for his relentless nature and enforcer-like mentality on an undersized team, kept pushing. With just seconds remaining, he charged the left side of the box after a teammate threw the ball in toward Martinez, who came out and never fully controlled a jump ball. The ball trickled behind the keeper, and Cherry simply knocked it in.

“They got a goal on us. We had to go at them, and that’s what we did,” W.T. Woodson Coach John McAuley said. “We were of course looking for Michael Cherry to create something and some others joining in, so we were really sending the services in.”

Martinez was involved in a collision in overtime and came off after resting on the field for a few minutes. The Cavaliers scored immediately after, using a set-piece from about 40 yards away to set up a header from Lutz.

It was the second time T.C. Williams has endured heartbreak to a Patriot District heavyweight. After going up 2-0 within the first four minutes against No. 3 Lake Braddock on April 11, the Bruins rallied in the second half and earned a 2-2 draw. Woodson now has command of the race with two games remaining.

“Now that we’re on top of the board, it puts a lot of the next game in our hands,” Cherry said. “We’re determining our destiny. We’re the ones that can push forward.”