Between its initial unification in the 7th century - from three predecessor Korean states - until the 20th century , Korea existed as a single independent country .