Chalk one up for the Mainlanders on Friday.

The Valley Blue Sox (5-2) handed the Martha’s Vineyard Sharks (3-1) their first loss of the season Friday night at MacKenzie Stadium in Holyoke, scoring a 5-4 victory in NECBL action.

Trailing 4-3 in the ninth inning, Brian Hart doubled and set the stage for Cole Andrews, who belted a two-run, walk-off home run over the fence to snag the win.

“We just have to stay with it throughout the whole game, and this proves that. We were knocking on their door for a lot of innings, had guys on bases but couldn’t get that big hit, so I’m glad we could pull through in the end,” Andrews said.

Valley’s Robert Hensey of Monmouth struck out nine in six innings on the mound. Ryan Towle and Jonathon Kelly also pitched well in the victory out of the bullpen.

“Our pitchers did a great job getting a bunch of zeros back to back to back,” said Blue Sox skipper Hez Randolph.

The Blue Sox travel to the Mystic Schooners on Saturday for their second matchup of the season at 6:05 p.m. They return to MacKenzie Stadium on Sunday to face the Ocean State Waves at 5:05 p.m.