In the end, somebody had to lose.

On Tuesday afternoon, the boys’ basketball team took on defending state champion Danvers in the semifinals of the Division 3 state tournament, battling back and forth with the Falcons on the green-painted parquet of the TD Banknorth Garden in Boston. The game had just about everything — late rallies, one-point leads, clutch breakaways and raucous fans — but a Hollywood ending never came for the Vineyard. The team fell 50-47 in the final second.

“We played our best,” Vineyard captain Izak Browne said after the game. “Honestly, I feel like we could have come out with a W today, and we just, I don’t even know, couldn’t finish ticking them off.”

Senior Izak Brown makes a layup in the first half. — Ivy Ashe

The team started strong, scoring the first points of the game, courtesy of senior forward Navardo Anderson, and holding pace with the Falcons for much of the first quarter. But the Vineyard struggled with simple shots, allowing Danvers to pull ahead 17-10 at the end of the first quarter, the largest lead either team would see in the entire game.

A huge second quarter by Browne kept the team’s hopes alive. The senior forward scored 12 of the team’s 14 points during the quarter. The Vineyard defense, meanwhile, held Danvers to just seven points, and senior forward Liam Weston hit a free throw to tie the game 24-24 at halftime.

“Defensively, we did a great job the whole game . . . but you have to play both ends, and it just didn’t fall for us early,” head coach Mike Joyce said after the game.

The lead changed hands five times in the third quarter.

Senior captain Jack Roberts scored seven points in the fourth, sinking two free throws with 11.8 seconds left in the game to push the Vineyard within three points of the Falcons, who were ahead 48-45.

The Vineyard grabbed the ball in Falcon territory and Browne dished to senior guard Brandon Watkins, who dribbled past the Danvers defense and down the court to score a layup with five seconds left. 48-47, Danvers.

A Vineyard foul put Danvers senior Nicholas McKenna at the line; McKenna sunk his two free throws to put the Falcons ahead 50-47.

The final buzzer sounded just as Browne let fly a three-point attempt, which bounced wide off the backboard. Danvers had booked its second straight trip to the state finals.

“We had seen some of their games, and we knew how big they were, how athletic they were, how skilled they were,” Danvers head coach John Walsh said after the game. “Overall, it’s survive and advance.”

Jack Fielding watches the final seconds of the game. — Ivy Ashe

“Every year you look, [the Vineyard is] always in the mix; they’re so well-coached,” he added. “Coach Joyce did a great job . . . that’s all you can ask for: tough, tough kids.”

It’s safe to say that nobody, not even the Vineyard team itself, expected a season like this one. The squad posted a 14-5 record, defended their Eastern Athletic Conference title for the fourth straight season, won the Division 3 South Section Tournament by upsetting number one seed Wareham, and, of course, advanced to the state semifinals.

“Oh, the season was great,” Browne said. “At the beginning of the season, we didn’t really have a lot of chemistry, and throughout the year we worked hard and became closer and closer . . . we had team dinners and just became a family, the way we’re supposed to. And it fell [together]. We made history.”

Last year’s Vineyard squad posted a regular season record of 18-2, the best in Mike Joyce’s tenure. But graduation culled the ranks and only Browne, Roberts and Watkins returned as letter-winners. For the remaining eleven players, it was their first taste of the faster play and rougher opponents that varsity competition brings. Four of the players were juniors. Tim Roberts, a sophomore and Jack’s younger brother, moved up to varsity at season’s end. Navardo Anderson played in just his second season of organized basketball.

“As the season progressed, and definitely through the playoffs, we definitely got together,” Jack Roberts said. You could see it on the court, he added.

Throughout the postseason the team has had a 12th man on their side as well — the Vineyard fans, and the Island community itself. The high school received a half day on Tuesday so students and faculty could go to Boston and cheer on the squad. Over 400 students packed into seven buses, sponsored by Our Market, Your Market, the Hargy family, even former Vineyard head coach Jay Schofield, to travel to the Garden. Carloads of supporters also made the trek, and Vineyard alums from the Boston area arrived to cheer on their alma mater.

Senior Jack Roberts looks to pass as he is guarded by Danvers' Jake Cawlina. — Ivy Ashe

“This was as far as I know the most fan buses ever sent,” Martha’s Vineyard Hoop Club president Peggy Stone said on Thursday. Hoops Club spirit coordinator Rachel Araujo had put out a call on Facebook, Mrs. Stone said, and the Island responded. Three buses, sponsored by Our Market, Dairy Queen, Mone Insurance, and Araujo Brothers, had made the trip to the South Section finals.

Students traveled for free to both games thanks to donations from the community. Sharkey’s hosted a Dine-to-Donate night on Sunday and the Steamship Authority offered a reduced fare. And when several of the buses, including the team bus, got stuck in Boston rush hour after the Danvers game, the SSA ran an extra late-night boat to get everyone home.

“It’s such a group effort,” Mrs. Stone said, thanking the families of the varsity players for their help chaperoning buses.

The effort paid off.

“It’s definitely the best experience I’ve ever had,” Jack Roberts said. “It’s just too bad we lost, but other than that it was awesome, the fans and everything.”

“I just wish it could have lasted longer,” he said.