During World War I (1914–1918) Montenegro allied itself with the Triple Entente, in line with King Nicholas' pro-Serbian policy. Accordingly, Austria-Hungary occupied Montenegro from 15 January 1916 to October 1918.