Lithuania regained its independence following World War I but was annexed by the USSR in 1940 - an action never recognized by the US and many other countries .