The "Flach" was built in 1866 at the request of the Chilean government, by Karl Flach, a German engineer and immigrant. It was the fifth submarine built in the world and, along with a second submarine, was intended to defend the port of Valparaiso against attack by the Spanish navy during the Chincha Islands War. (The second vessel, built by Gustavo Heyermann, sank on its maiden voyage.)