In 1665 the neutral harbour of Bergen in Norway, at that time under the sovereignty of Frederick III of Denmark, had become a gathering place for some 5O richly laden Dutch merchantmen waiting to be escorted safely home by a fleet of men-o-war, now that the Dutch and English were at war again. The English were especially interested in the homeward-bound fleet of Pieter de Bitter, which had anchored in Bergen on 8 August 1665, carrying 'booty that would pay for the powder and shot of a twelvemonth's war', according to a contemporary English source. The cargo consisted of over 200,000 rugs, tapestries and cotton fabrics; 121,600 pounds of mace; 314,000 pounds of nutmeg; 440,000 pounds of cloves; 22,000 pounds of indigo; 1,500,000 pounds of nitre; 18,000 pounds of ebony; 8,690 catti of Chinese silk (1 catti = 0.62 kg), 4,000,000 catti of pepper; 500,000 pounds of Ceylon cinnamon; 3,084 uncut diamonds; 2,933 rubies; 18,151 ounces of pearls, and 16,580 pieces of porcelain.
Lord Sandwich wrote about this treasure, which was estimated at 11 million guilders: 'I am apt to beleive scarce at any time in one place soe great a mass of wealth was ever heaped together'.
Dutch trust in the neutrality of the Danish king proved to be misplaced, although they didn't find that out till much later. Frederick III informed the British envoy at his court that he w ould be prepared to turn a blind eye to an English attack on the Dutch ships at Bergen in exchange for half the booty and strict secrecy. Immediately upon hearing this Charles II ordered Lord Sandwich, LieutenantAdmiral of the British fleet, to send a squadron of men-o-war to Bergen to capture the Dutch merchants. Frederick would instruct General Ahlefeldt, commander of the Dash forts and troops in Bergen, to put up a show of resistance. Luckily Air the Dutch, Ahlefeldt had not yet received this message when, on the 10th of August, 14 English ships and three fireships under Rear Admiral Sir Thomas Teddiman reached Bergen. He indignantly refused the request of the English envoy for permission to enter the harbour and attack the Dutch ships and insisted the English leave immediately. Teddiman, however, ignored this refusal and dropped anchor at the entrance of the bay, thereby manoeuvring so clumsily that two of the ships ran aground and the rigging of a third almost got caught in that of the admiral's ship. In the midst of all this chaos they omitted to salute the Danish flag, whereupon the Danish punished this outrage by firing a few shots at them.

The English, however, were not put off by this and dropped anchor across the entrance of the bay. Negotiations went on all night between Ahlefeldt and Teddiman's envoy, Mountagu. Ahlefeldt remained adamant in his refusal to cooperate in an attack on the Dutch. Commander Pieter de Bitter, having watched the British movements, was not slow in taking countermeasures, after first securing Danish support. He placed eight of his best-armed ships in the form of a crescent starboard-on towards the enemy. As most of the men were still ashore, ignorant of the danger, this proved a very time-consuming business. De Bitter had the town bells rung and the drums sound the alarm to get his men back on board. Reinforcements were sent to the crew of the eight ships that were got ready for the fight, while the rest of the men were sent to the castle and to the other forts on the shore. De Bitter personally spoke to his men to encourage them and promised them extra pay if they succeeded in warding off the attack. In the meantime some of the English who had gone ashore so frightened the local populace that the shops were shut and women and children were evacuated. The English attacked at six o'clock the next morning. They had agreed only to fire on the castle and the other forts if they inflicted serious damage to the English fleet, and they would strive to spare the town by aiming low.

A last attempt at negotiations failed, whereupon the English hoisted the bloody flag and started the attack by firing 400 guns. In their concern not to hit the town accidentally they had aimed too low, and as a result did hardly any damage at all. The Danish, who had initially kept out of the fray and tried to persuade both parties to stop the fight, decided to join the Dutch when the Danish castle was hit and some of their men were killed. The wind being off the land, the English were unable to use their fireships and were instead hindered by the smoke coming from the Dutch ships. More and more Danish and Dutch guns found their target and after three hours of fighting the English losses had become so great that they were forced to call off the action.

Their retreat was so confused that the ships' rigging became totally entangled, and to add to the chaos they were still being fired on by Danish guns from the forts to the north of the castle. English losses were heavy, with four to five hundred dead, while the Dutch only lost 25 men. Many ships were severely damaged, but were able to return home after only a few weeks. Concern for the rich cargo prevented the Dutch from pursuing the English, but measures were taken to prevent a second attack. The English, however, did not try again, although Ahlefeldt, who had by now received his king's orders, let Teddiman know that he would not impede the English again. Even a promise by the English king that he would receive half of the spoil was not enough to persuade Teddiman to risk his crew and his heavily damaged fleet a second time, and he fled the Norwegian waters. The Dutch merchantmen remained in Bergen for another three weeks. On 29 August the Dutch navy under Michiel de Ruyter arrived to escort them safely home. The return journey, however, was equally fraught with peril. The ships were scattered in a heavy storm that lasted for days. Some had to take shelter in Norwegian harbours, others ran aground, while two of the richest merchantmen fell prey to the English after all. Despite these considerable losses, many of the ships and the greater part of the cargo could be returned home safely, thanks to the prudence of Pieter de Bitter, who was awarded a gold chain with a medal and the sum of 1,500 guilders by the East India Company in recognition of his bravery at Bergen.

Willem van de Velde the Elder had sailed with De Ruyter's fleet, and although he did not actually witness the fighting, it could not have been difficult for him to gather enough firsthand information to enable him to picture the event accurately. Van de Velde made a series of drawings, often annotated, which served as a basis for a number of large pen paintings. These drawings are now in the National Maritime Museum in Greenwich, in the Boymans-Van Beuningen Museum in Rotterdam and in the Copenhagen museum.