The game you are thinking of is almost certainly Mutiny on Nitrome. It has that swashbuckling pirate flavor while borrowing the tug-of-war, territory-control feel you remember, where each side pushes to claim ground.
Nitrome is well known for its quirky browser games, and Mutiny fits right in with its charming pixel art and back-and-forth battling. If that mix of pirates and territory fighting rings a bell, give it another go.