Originally Switzerland is a confederation of many different independent states established in 1291. Switzerland truly became an independent national state during European state building in 1848 with its first constitution. Before all that, several parts of Switzerland had been temporarily under the rule of different dukedoms. And Switzerland established itself by fighting together against all those foreign dukedoms like the Habsburg etc. For a while around 1800 Switzerland as a whole was also run over by Napoleons Army. So in the end Napoleon played a role because he made them adopt a French influenced constitution. This constitution was the first that treaty Switzerland like a centralised state rather than a confederation of states. Of course this constitution was abolished as soon as Napoleon was gone.
External Sovereignity was granted to Switzerland at the Congress of Vienna in 1815.
Further information:
Originally known as Helvetia, the land was Romanised after being overrun by Julius Caesar during the 1st Century BC. When the Roman Empire began to decline three centuries later, the area was invaded by Germanic forces, under which it remained until 1276, when the Austrian House of Habsburg took over the crown of the Holy Roman Empire. The Swiss struggled for independence against the Austrians for two hundred years, and the Swiss Confederation was founded in 1291 as a defence measure. Originally uniting three cantons, other localities also joined, eventually enabling the Swiss to bring down the Austrian forces.
Following the Battle of Dornach, in which Emperor Maximilian I's troops were decisively beaten, the Swiss Confederacy, or Confederation gained its independence from the Holy Roman Empire. This was sealed in the treaty of Basel on 22 September 1499, although the Treaty was not formally recognised until the Peace of Westphalia, two peace treaties of 1648 which affected a number of European states.
The Confederation was replaced by a central federal government following a new constitution in 1848, which was updated in 1874.
Samoa was the first pacific country to gain their independence
The first country ever to gain independence was San Marino who achieved independence from the Roman Empire.
haitiThe first Latin American country to gain its independence was Haiti.
I cannot tell when your country gain independence because I do not know your country.
Belize was the last country in Central America to gain independence, achieving independence from the United Kingdom in 1981.
Honduras gained Independence from Spain
Haiti gained its independence from France.
Britain
USA
Britain
France
Britain.