Although the Royal Canadian Navy was not formally established until just before the First World War, Canada has a long history of naval activity in many manifestations. The establishment of the formal RCN was a difficult and challenging process, and it was not until the Second World War that it came into full force. By the end of WW II Canada had the third largest navy in the world and has served with pride and effect since in NATO roles, overseas missions, UN Peacekeeping assignments, humanitarian relief operations, as partners in conflicts and in anti-piracy patrols. These are the periods of Canada's Naval history.