Catalan is a romance language whose earliest literature dates back to the 12th century. In the Middle Ages Catalan military expansion spread the use of the language beyond modern Catalonia, but following the unification of Castile and Aragon the language lost ground to Castilian. During the Franco régime the use of Catalan and other minority national languages was prohibited in the media and in public institutions. This, together with the influx of Castilian-speaking immigrants, posed a threat to the survival of the language. Since 1979, when Catalonia's autonomous government, the Generalitat, was re-established and Catalan gained lengua cooficial status, the language has returned to public life in Catalonia and is flourishing. Indeed, many Catalan authors publish first in Catalan and only later in Castilian. Outside Catalonia, Catalan is also spoken by large numbers of people in the Balearic Islands and Andorra. Valenciano, a language spoken in the Valencia region, is closely related.