During the English Civil War, many changed sides depending on the wind and prevailing conditions.
One such was Sir Hugh Cholmley, who did this a few times, he ended up defending Scarborough Castle as a member of the Royalists' Forces.
The siege lasted 5 months and the main force laying siege was commanded by Sir John Meldrum, he survived a 200 foot fall from the cliffs but was later fatally wounded and command was taken over by Sir Matthew Boynton. So lots of local connections here.
Pirates were using the harbour and attacking coal ships going to London and so the town and port were seized but the castle was not seen as that important. Presumably the batteries at the castle could harass the harbour and shipping and eventually it was laid siege to.
The castle was bombarded with the largest cannon then available - A Cannon Royal, this had a bore of 8 inches and fired a shot weighing 56-64 pounds.
There was also a battery just outside the castle know as Browne Bushell's battery, after Captain Bushell. Another one who changed sides many time. He was a naval Captain who ended up here and was eventually executed for piracy. He was from Whitby and was married to a Fairfax.