Historically, Occitan was spoken over a huge area - much larger than the traditional French speaking area. In the Middle Ages Occitan was the international language of the Troubadours - rather as English is the international language of today's rock stars. It was also an administrative and judicial language, at a time when most other countries in Europe still used Latin for written documents. After the area was annexed to France in the thirteenth century, following the wars against the Cathars of the Languedoc, the Occitan language was progressively minimalised. To the east, the Gascon dialect had already been forbidden in all official acts since 1462. In 1539, the Villers Cotterêts' Edict required the use French in official acts. French was imposed as the official language of administration and slowly replaced Occitan in all aspects of a written language. Having been the first literary language of mediaeval Europe Occitan was now reduced to an oral language.
Like "unofficial" languages elsewhere in Europe, the use of Occitan was actively discouraged for centuries in France, in the interests of imposing an official language to help create and then bolster a national identity. After the French Revolution, the Abbé Grégoire led a project for the "elimination of patois" throughout France (not only Occitan, but also Catalan, Basque, Breton, and several other ancient languages). To help efface the traditional regional identity centred on Toulouse, the Languedoc was detached from its historic capital and the Occitan language not merely discouraged but actively suppressed. School pupils were punished well within living memory for speaking their native language on school premises.