In response the people of Nidwalden ( Obwalden joined shortly before the document was signed , the two halves forming Unterwalden ) joined Uri and Schwyz to form an alliance which is considered the foundation of modern Switzerland .
In 1291 the people of Nidwalden joined Uri and Schwyz to form an alliance .