Until 1918/20 it belonged to Hungary, 1920-1924 and 1938–1939 to Poland, 1939–1945 to Slovakia, 1945–1993 to Czechoslovakia.
Until 1918/20 it was under Hungary's control, from 1920-1924 and 1938–1939 to Poland, from 1939–1945 to Slovakia, and from 1945–1993 to Czechoslovakia.