Limited home rule from Denmark was granted in 1874 and complete independence attained in 1944 .