The British commander, Adm. James Sommerville, sent a junior officer to the French admiral, Marcel Gonsoul, with an ultimatum: scuttle your ships or sail them out of the reach of Germany. The two men knew each other personally, and this gesture seems to have been deliberate. More French sailors died at Mers el-Kebir than Americans at Pearl Harbor. The viciousness of the attack, just after the massive losses the French army incurred to save the British army at Dunkirk, was not just to prevent the Germans from taking the French capital ships but to show doubters in London that Churchill was tough enoiugh to lead Britain.
Eventually it was passed over after the Liberation, but it ceretainly made it difficult for the French to envisage fighting with the British agints the Axis.