There are three major historical divisions of the Kingdom of Spain: the Crown of Castile, the Crown of Navarre and the Crown of Aragon. The Crown of Castile was the largest of the three entities and, at one time, included Spain's vast overseas empire stretching from the Spanish Caribbean to the Philippines. The Crown of Aragon was the next largest entity and included Spain's holdings in Italy, which were composed of Corsica, Naples, Sardinia and Sicily. The Kingdom of Navarre, which was nominally annexed to Castile, had an ambiguous status in Spain that vacillated between a Castilian province and a completely autonomous political entity, but is arguably the third and last of the three major parts of Habsburg Spain. Each of these entities had their own fueros (or furs in Catalonian), a set of constitutional laws that the King of Spain pledged to uphold as a part of his coronation oath.
However, the Crown of Aragon and the Crown of Castile did not exist in a vacuum. While each of the Crowns had their own fueros that served as a sort of fundamental law, the pre-unification Kingdoms of Aragon and Castile were also bound by regional fueros from earlier conquests. In the Kingdom of Aragon, the Crown was obligated to comply with furs in Aragon, Majorca and Valencia, each of which had their own parliament and judiciary in order to enforce their respective rights. The total sum of these furs would become the laws of the Crown of Aragon that were, in turn, combined with the laws of the Crown of Castile and the laws of the then-conquered Kingdom of Navarre to check the power of the King of Spain who acted with theoretically unlimited authority on the national level. After the War of Spanish Succession, the various regional fueros were eliminated by the Decretos de Nueva Planta (Decrees of Nueva Planta) in an effort to modernize the anemic Kingdom of Spain.
The revocation of the fueros led to several revolts throughout the country as various regional groups fought for power against Bourbon rule. Despite the common legal system and common Crown, most of the revolts were prompted by the revocation of local privileges rather than by nationalism as a whole. Valencians therefore saw themselves as Valencians rather than Aragonese, which meant that Catalonian domination was just as likely under an independent Kingdom of Aragon than under the status quo with Spain. There has therefore never been a distinct Aragonese nationalism popular outside of Catalonia, although the 19th century Renaixença reenergized a desire to connect and preserve Catalan as a language in Valencia itself. Valencian regionalism therefore became a popular movement in its own right as Valencians rejected a standardized and non-localized version of Catalan and sought to preserve a distinct regional culture within the framework of the Kingdom of Spain that would check both Catalonian and Spanish nationalism.
My response addresses the claim that Valencians and Cataláns speak essentially the same language, which would suggest that the two regions might be united in their opposition to the Spanish central government. In fact, Valencia has long had a distinct national identity, which includes an explicitly anti-Catalán ideology developed immediately prior to, during, and after the Spanish transition to democracy after Franco's death in 1975.
First, I want to point out that while most linguists consider Valencian to be a dialect of Catalán, 65% of the Valencian people consider it to be its own distinct language. This statistic has remained unchanged since at least 2001 (source).
Also, what is now the Autonomous Community of Valencia first gained self-governance in 1238 during the reconquista of the Iberian peninsula as the Kingdom of Valencia under the Crown of Aragón. They retained self-governance until the Spanish War of Succession in 1707, though there was a resurgence of Valencian nationalism at the end of the 19th century that culminated with a Statute of Autonomy gained during the Second Spanish Republic. With the end of the Spanish Civil War in 1939 and Franco's takeover and defeat of the republicans, Valencian nationalism as well as their language and culture were violently and aggressively repressed, along with the languages and cultures of all non-Castilian regions of Spain. Valencia and the other Spanish regions didn't gain back self-governance and autonomy until after the death of Franco, fall of his government, and transition to democracy beginning in 1975. Their status as an autonomous community was made official in 1982.
However, Valencian nationalism didn't dissipate during the time of Franco. And in fact, one particular strain of that nationalism, known as blaverism, was explicitly anti-Catalán. The term itself comes from the Valencian word "blava", meaning "blue", which refers to the blue fringe on the Valencian flag that distinguishes it from the other regional flags, particularly that of Cataluña. The ideology developed in direct reaction to, and rejection of, a 1962 political essay by Valencian author Joan Fuster (Nosaltres, els valencians), wherein he argues that Valencia and Cataluña should be one nation, independent from Spain, united under what he called their "shared" language, Catalán. The blaveristas called this Catalán nationalism and imperialism and accused Fuster of advocating the imposition of Catalán rule over Valencia. Their rejection of this so-called "pan-catalanism" is the basis of their ideology, which exists to this day and is strongest in the city of Valencia and the regions immediately surrounding it.
I hate you, because I've just worked a 12 hour shift, I'm waking up at 7.30 tomorrow and taking a train as soon as I finish working. Also it’s 23:00 here. But I need to reply to this.
Both /u/alexistheman and and /u/joao24 have pointed out some facts, but I think they’re mistaken in some parts of what they explained.
First, let’s summarize the history of Valencia prior to the emergence of a nationalist movement in both Catalonia in Valencia. Both territories (I’ll use the term “nations”, but as you can guess, it’s a contentious issue and Spanish nationalists would rather refer to them as “regions”) were part of the Crown of Aragon which was dynastically united to the Crown of Castille in 1492 with Ferdinand and Isabella’s marriage. Their particular legal systems, cultural traits and language, however, were to survive for some centuries.
Valencia had been conquered by James I the Conqueror in the XIII century, and repopulated with both Aragonese and Catalan people who coexisted with “moriscos” (muslim or muslim descendants) in the Kingdom of Valencia for centuries. This repopulation pattern can still be observed in the linguistic distribution of Valencia: westward Valencian comarques (the traditional territorial distribution, think of it as shires or counties) like la Foia de Bunyol have always been traditionally Spanish speaking with Aragonese dialectal traits. Comarques near the sea or in some of the southern mountain ranges (like the Mariola Mountains) are Valencian speaking, as the repopulation by Catalans was more relevant there.
Isabella died and Ferdinand married Germana of Foix, who became vicerroy of Valencia in 1523. Her court in Valencia (the capital city of the kingdom, which shares the name with it) adopted some of the Castillian manners and cultural traits, and this started the long-term disglossic situation of Valencia (Sinner, 2004). Castillian (ie. What would be eventually known as Spanish) was beginning to be seen as the language of the aristocracy and higher classes in Valencia city (Verdú cited in Sinner 2004).
Fast forward to the War of Sucession in Spain, early XVIII century: candidates from France (Phillip d’Anjou, later the founder of the Bourbon dinasty in Spain) and Archduke Charles from Austria clash for the crown, which incorporates the different kingdoms of the Iberian Peninsula. Philip has the support of most of Castille and France, Charles of Britain and part of the Crown of Aragon. In Valencia the situation was complex, because some peasant revolts had been occuring for the last century and there was a high degree of social unrest. Remember the “moriscos” I mentioned earlier? Phillip III had expelled them from Valencia in the XVVII century, accusing them of being a fifth column of the Turks. This had caused a growing social unrest as peasants now were scarcer and resented the exploitation by landlords, which resulted in the Second Revolt of the Brotherhoods (Germanies).
Thus, the War of Succession had a lot going on in the background, and part of the popular support that Charles enjoyed in the Crown of Aragon and especially in Valencia was the fact that he swore the furs (the charter of rights that the inhabitants of the Kingdom of Valencia enjoyed) and was seen as a defender of common people against the aristocracy and higher classes, who supported Phillip. Charles was an opportunist, of course, but the popular support for his cause was something rooted in the social upheaval of the time, as songs like El Cant dels Maulets show (“Vine Pilareta, que et pegue un sacsó, els peixos a l’aigua, i els amos al clot”, “Come Pilareta, so I can shake you (a reference to intercourse), fishes to water and lords to the pit/hole”). His supporters called themselves “maulets” from the Arab voice for slave, mawla, as they resented being treated like slaves (Ferrando i Francés, 2011).
Charles lost the war and with him, the territories of the Crown of Aragon. Phillip, by now Phillip V showed a heavy hand in repressing those who had revolted against him, for example burning Xativa for resisting him and renaming it San Felipe de los Reyes (if you visit Xàtiva, you’ll see they still have a painting of Phillip V hanging upside down as a show of contempt). He also passed his Decretos de Nueva Planta, which imposed Castillian laws and the use of Castillian in the administration on the whole territory of his kingdoms. The goal was two-fold: on one hand, repressing those who had resisted his bid for the crown. On the other, centralizing his kingdoms, a la French absolutism, where a centralizing tendency had been going on. The declive of Valencian/Catalan sped up. This is the point where it makes sense to talk about Spain.
Fast forward again, to the XIX century. This is the spring of nations in Europe, and Spain was not beyond its reach. Different national movements within it started to flourish. The strongest of them all was Spanish nationalism which “woke up” during the French napoleonic invasion. The 2nd of May, with the revolt of the people of Madrid against French troops, is a symbolic date for many Spanish nationalists, as it was a symbol of popular resistance against French occupation. Liberal ideas merged with the inchoate Spanish nationalism to begin to sculpt the modern idea of Spain as a nation, not a mere collection of kingdoms. But other territories in Spain also developed different movements. The one that matters to us was the Renaixença, literally the Renaissance, which was a mostly cultural movement in both Catalonia and Valencia and which aimed to re-establish Catalan and Valencian cutlture after their centuries long declive. Think of it as a sort of Gaelic Revival in Ireland. Although the movement was cultural, it would set the template for the political movements that would follow.
Move forward again, this time to the very early XX century. Catalan nationalism was already becoming a force to be reckoned: Catalonia was one of the territories that were first industrialized in Spain, and this meant that a certain bourgeoise developed there, which didn’t shy away from keeping Catalan culture and language alive. By contrast, Valencian had been disappearing fast from Valencia city, although the old Kingdom of Valencia still retained a lot of Valencian speakrs, but beyond the hinterlands of Valencia city (in rural parts and in other cities like Alcoi). This meant that in general, Valencian was much more likely to be seen as a “hick”, peasant language. This was, however, the time when something that resembled Valencian nationalism emerged with Faustí Barberà, a Valencian thinker that opposed Castillian assimilation of Valencia. During the first decades of the XX century, Valencian regionalism (the idea that Valencia is a region of Spain that has to maintain its character) and Valencian nationalism (the idea that it is a proper nation, which should exercise its right to self-determination and decide its political organization) began to gain traction, sharing some traits. Groups such as Patria Nova (New Motherland) appeared.
https://upload.wikimedia.org/wikipedia/commons/0/0d/P%C3%A0tria_Nova_1915.jpg
It is during this time when you can see what would be the crux of the modern Valencian identity question: its relationship to both Catalonia and Spain and thust to itself. Some Catalan and Valencian authors claimed that given that both Catalonia and Valencia shared a language (even though the name for it was Valencian in Valencia, and Catalan in Catalonia) they also shared a culture and were part of, if not the same nation, a “cultural ambit”, together with the Balearic Islands (which also share Catalan as a native language). Think of it as brother Gaelic nations such as Scotland and Ireland. Nicolau Primitiu, a Valencian nationalist, even came up with the term Bacàvia (from Balears, Catalonia and Valencia) as a term to encompass all three nations. On the other hand, a strain of anti-Catalan Valencians developed, primarily in Valencia city (where the demise of Valencian as a language was very present): the followers of Valencian novelist Blasco Ibañez, who developed blasquismo, a Spanish nationalist, Valencian regionalist variety of the Republican ideology that opposed both the Crown and the Church. Another author, Josep Maria Bayarri, wrote “The Catalan danger”, advising Valencians not to think of themselves as part of Catalonia but as a distinct nation, even though his work praised Catalan nationalism highly, and was actually a sort of “let’s do like the Catalnas are doing, but we can do it on our own: Valencia is a nation and should be free”.
As I have mentioned with Blasco Ibañez, all sorts of ideologies got mixed with Valencian nationalism and regionalism, because it was a period of insanely diverse political agitation in Spain. Liberalism, republicanism, socialism and later anachism and fascism were the main forces in early XX century Spain. Valencian nationalism started to be a strong force after the Primo de Rivera dictatorship, with the coming of the Second Spanish Republic (1931). Left-leaning blasquistas eventually broke with his regionalism and decided to develop a fully fledged left-wing Valencian republican nationalism, with the foundation of Esquerra Valenciana (Valencian Left), founded in 1934 by Vicent Marco Miranda, who had split with his early blasquista party because of its gradually more rightist tendencies and who had been in shock with the repression of Asturian miners in 1934 (when they almost staged a socialist revolution).