You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Bern

Context:
Bern was occupied by French troops in 1798 during the French Revolutionary Wars, when it was stripped of parts of its territories. It regained control of the Bernese Oberland in 1802, and following the Congress of Vienna of 1814, it newly acquired the Bernese Jura. At this time, it once again became the largest canton of the confederacy as it stood during the Restoration and until the secession of the canton of Jura in 1979. Bern was made the Federal City (seat of the Federal Assembly) within the new Swiss federal state in 1848.

Question:
Why were French troops in Bern?

French Revolutionary Wars