When rebel forces threatened the Republic , Nidwalden was attacked by French troops on 9 September 1798 .
After rejecting a new constitution by Napoleon - the ideas of the French Revolution were not popular in such an agricultural area - Nidwalden was attacked by French troops on 9 September 1798 .