Part I: The New King
The Spaniards' expectations toward their new king were very high, expectations that came from the efforts that had been made around his election and crowning, among them the hard war against France. And the king had the intention to honor those expectations: he knew that his current popularity would be something temporary, and that, if he wanted to keep the throne for himself and his family, he would have to do his best so that the people were happy with him.
For Leopoldo I, King of Spain, his first months of reign were among the busiest in his life until then. One of the first things he did was to travel to the north and visit the hospitals where the injured soldiers were kept: some of them had been mutilated, as the injuries had derived into gangrene, and the only way to stop it was to cut off the rotting member.
Many burials of the deceased soldiers also received the visit of the Royal Family, which gave its support to the soldiers' relatives, praising their heroism and the great effort they had carried out. Prim's government, at the suggestion of the king, used part of the first payment of the war indemnization to pay the injured soldiers and the deceased soldiers' relatives as soon as possible, in order to alleviate their loss.
Another of the first official acts the King carried out was a visit to the recently conquered territory of Perpignan, which would become the fifth province of the region of Catalonia, which was followed with a visit to the barracks of the Spanish troops that were occupying Southern France – an occupation that would become official a few days after the King's visit, with the signing of the Treaty of Frankfurt.
The king also used part of his great personal fortune to finance the Spanish Red Cross, which had been founded seven years before under the auspices of the Knights Hospitaller, as it was playing a fundamental role in the healing of those injured in war. This move was very applauded by the population, as they could see how the king involved himself in the matter, as opposed to previous kings and queens.
Leopoldo I would also decorate many of the soldiers that had distinguished themselves during the war as they did heroic and magnificent actions that had helped in achieving Spanish victory. The military leaders that had led the Army and the Navy also received great honors. Juan Prim was named Duke of Perpignan. Francisco Serrano was named Duke of Irún – it would have been Vitoria, but the Dukedom of Vitoria was still held by the descendants of the Duke of Wellington, who had helped in the expulsion of French Napoleonic soldiers from Spain during the Peninsular War. Generals Manuel Pavía y Rodríguez, Eugenio de Gaminde and Lorenzo Milans del Bosch were named Dukes of Oran, Montjuic and San Jerónimo, while General Espartero was named Prince of Vergara for his role in finishing the First Carlist War.
Two admirals were also decorated and named Grandee of Spain: Claudio Alvargonzález Sánchez was named Duke of Abtao, while Juan Bautista Topete was named Duke of Cádiz, with said title being retired from Francisco de Asís de Borbón, Isabel II's consort.
Leopoldo I worked very hard during those first months, but nobody could deny that his work was a great help to re-establish the image of the monarchy, which had been nearly destroyed by Isabel II's actions.
Part II: The Pacto de los Heros
While the king publicly worked to aid in the reconstruction of Spain after the war, the Spanish government also worked restlessly to establish the complete institutional normality in the country, as well as a continuity respect of the government that had, until then, held the reins. Thus, General Prim consulted with the three parties that formed the Government Coalition (the Liberal Union, the Progressive Party and the Democrat Party), and, on December 30th, he presented his resignation as President of the Council of Ministers to the king, so that the first General Elections of the new kingdom were called. Leopoldo I accepted the resignation, recognizing the gesture that had come from the nation's main political and military figure, to whom he owed the privilege of occupying the Spanish throne.
The next elections were called for the following Saturday February 18th 1871. The candidacies formed by those that had showed their support for the French enemy to restore the Bourbon monarchy, as well as that of the Republicans that had tried to take advantage of the situation to launch a coup while Spanish soldiers fought and died against the French, were forbidden from taking part in the elections, as they had showed their will to betray the crown and nation.
Two days after Prim's resignation, the leaders of the Coalition parties (Prim, Sagasta and Ruiz Zorrilla from the Progressives; Serrano, Topete and Francisco Silvela from the Unionists; and Martos, Nicolás María Rivero and Manuel Becerra from the Democrats) met in the recently named Presidency Palace, which had previously been Casa de los Heros, where Serrano had been living since he was named Regent of the Kingdom of Spain. There, the nine men spent several days drawing the nation's political future, as well as that of the wide government coalition the three parties had formed since La Gloriosa. Their final agreement was set in a pact that would be known to posterity as the Pacto de los Heros.
The war with France had deeply altered the Spanish political panorama, with a deep internal crisis among those political forces that had opposed the new regime, symbolized in Leopoldo I and the coalition, which had brought the latter a grand feeling of triumph. However, Prim and the other Progressive leaders knew that this could backfire on the new regime and erode its stability, given the already existent strains within the coalition's heart, especially between its extremes. Thus, it would be ideal to start building a true two-party system, similar to the one existing in the United Kingdom, which Prim held in great esteem since his British exile.
However, the Progressive leaders also knew about Spain's recent political past, dominated by pronunciamientos, having generals turn into politicians, and the entrenched custom by which, when a political force took power, it immediately started to break down what the previous governors did without any kind of accord with the opposition, which made the construction of a stable two-party system very difficult.
Thus, and taking advantage of the current weakness of the opposition to Leopoldo's monarchy, the Progressive leaders suggested to the Unionist and Democrat leaders the possibility of making official the merging of the coalition into one great political party, which would encompass the political sensitivities of the new regime supporters. In order to prevent it from becoming a failure, the new party would have a limited life, both because they did not want the new party from turning Spain into a dictatorship and because it would be divided in two internal factions which, when well established, turn into the two parties envisioned by Prim and his followers. The idea intrigued the other members of the meeting, and soon a debate was held between all of them.
The nine leaders agreed that they would be signing a pact, by which the political forces they led compromised to continue the coalition during the following legislature, in order to reach a consensus on the next elections and strengthen Spain. Many points were strongly discussed among the three parties that would sign the pact, but, in the end, a balance was reached, by which, while it was not completely liked by everyone, at least they could feel content with their achievements. The pact would be forever remembered as the Pacto de los Heros.
One of the first points discussed was the exclusion of all active military men from politics. Given Spain's history, it was something that had to be stressed. Of course, the current legislature would be grandfathered in, because of the presence of Prim, Serrano and Topete in the government. The only exceptions would be the Ministries of War and Navy, as they were in charge of terms that competed exclusively to the military. All other political positions, especially the Presidency, would be closed for all active member of the Spanish Armed Forces starting in 1877. Of course, any retired members of the Armed Forces would be accepted.
The lack of democratic experience in the nation was also discussed in the Pact. As much as the Democrats wished the opposite, even them knew that democratic conscience was yet to take deep enough roots in the nation, although the last elections had shown that roots were growing. The Democrats accepted that, until Spain was clearly on the road, they might have to use the caciques' influence to strengthen the system, and also that the parties which the future coalition party evolved into took turns into power, although they warned that this situation would only be accepted for nine years.
Also, the Armed Forces, represented by Prim, Serrano and Topete, compromised to support the government to maintain its stability, as well as cutting off any attempt of military uprising. With this, they planned the subordination of the military power respect the civil power (as it happened in the more advanced nations Spain wished to emulate) and finally erase the traces of years of suffering owed to those uprisings.
Once the Pacto de los Heros was signed, the first matter to treat was who would become the first candidate to the Presidency for the new party. Juan Prim could have continued in power, but the Liberal Union retired their support for Prim, saying that they would only accept their leader, Francisco Serrano. Some leaks to the press about a proposition made by Prim of allowing Cuba to gain its independence if the Cuban people voted in favor after a ceasefire that was negotiated with the pro-independence rebels, the Unionist intransigence became clearer, and Progressives and Democrats gave up.
General Serrano publicly announced his candidacy for the Presidency on January 7th, with the support of the recently created National Union. His candidacy, besides its continuity respect Prim's government (which had won the war against France) showed a wide program of ideas and projects with which he hoped to eliminate all (or as many as possible) problems that had surged in the last century and allow Spain to rise to the level of other world powers like the British Empire or the German Empire.
Very soon, other political parties announced their candidacies: for example, the Patriot Alfonsines formed the Conservative Party, led by Antonio Cánovas del Castillo; the moderate Carlists (those that had broken with the other Carlists after Carlos VII asked for the French to invade Spain) joined the Neo-Catholics and the Integrists to form the Catholic-Monarchic Communion, while the Republicans that remained free, led by Emilio Castelar, also offered to lead Spain into greatness.
Unfortunately for them, the influence of the National Union was too big to be offset by any other, and on February 20th 1871 the results of the elections were presented:
National Union: 283 deputies
Republican Party: 35 deputies
Conservative Party: 30 deputies
Moderate Party: 29 deputies
Catholic-Monarchic Communion: 8 deputies
Montpensierist Party: 6 deputies
Non-established: 29 deputies (Cuba and Puerto Rico)
With this clear victory and absolute majority achieved by the National Union in the Congress of Deputies, as well as reaching 80 senators out of 100, it was the start of what historians would call “The Leopoldine Era”.
 The caciques were men with great influence in many towns and districts of Spain. In RL, they had affiliations to the two parties that took turns in the Spanish government, the Liberal and the Conservative Parties, and used their influence to make sure that the chosen deputy was the one either they or the government wanted. What happened was that the current government resigned, the King gave the government to the leader of the other party and it was them who decided which districts would be won by which party. Many times, the deputy had little to nothing to do with the district, and probably had never put a foot in there until they were chosen as deputies: this was known as encasillamiento.
Part III: The First Legislature
After their victory in the elections, Serrano's government started to work to solve the problems the previous government had not had the time or the means to solve. Fortunately, the presence of the King gave Spain a stability that could only help the nation. Also, the war compensations France was paying helped the government to achieve many more projects than what would have been possible in other circumstances.
One of the first tasks Serrano concentrated was the reform of the Armed Forces. Both had worked very well in the war, but nonetheless there were many problems that could make their tasks more difficult if there were another war in the future.
Since the Prussian army was a great model to follow after its smashing victories against their neighbors, it was decided that the Prussian military system would be adapted to Spain in order to reform the army and make it more suitable to the time. One of the biggest problems inherited from the times of Isabel II was the excessive number of officers when compared to the number of soldiers made future military operations not very feasible, as well as being a big hole in which money was being thrown. Many old officers would be demoted or discharged with honors. Many of those officers would be hired in the local or national Police Corps, or in the Civil Guard, whose military structure was appreciated by the military officers. The Obligatory Military Service was established for all 21-year-old men, thus ending with the complaints about the quintas; the General Staff was created, with the same attributions as its Prussian counterpart, and the Tercios Especiales were organized (see Part IV).
The Army weaponry was also modernized: to that end, the government financed the creation of a mixed capital company, Rifles Españoles Sociedad Anónima (Spanish Rifles Ltd, which would be more popularly known as RESA), which established its first factory in the town of Getafe, near Madrid. It was there where, using Spanish material, the first RESA 1871 Rifles were built. The RESA 1871, a copy under license of the famous Mauser Model 1871 (the single-shot rifles that had replaced the Dreyse needle gun in the German army) were very appreciated by the soldiers, which nicknamed it the “Escoba” (Broom), due both to its shape (long, narrow barrel and very wide butt) as well as its capacity to “sweep” the enemy from the battlefield. Other factories owned by RESA would make other kinds of weaponry, like new artillery guns, some of them based on the Krupp six-pound cannon.
Concerning the Navy, both Serrano and Admiral Topete realized that there were many things that could be improved in the service. Just like with the Army, it was decided that the most efficient system in the world would be adapted, and in that moment the whole world agreed that the British Royal Navy was, undoubtedly, the best Navy in the whole world. A reorganization of the officer corps similar to that in the army was started, and dry docks were built or expanded to build bigger and more powerful ships, something done especially to completely modernize the Spanish Navy and replace all wooden ships with ironclad steamers. Interest was also shown in the designs of submarines made by Cosme García Sáez  and Narciso Monturiol, and both were hired to design more submarines for the Spanish Navy, as they could be a potential great new weapon for the future.
The Armed Forces were not the only ones affected. In order to carry out Serrano's slogan, “To secure Spain, we must strengthen Spain”, the new government started to pass legislation that benefited local and national investments in the Spanish industry. This was better seen in the mining industry: two years before, the Provisional Government, in need of money, had passed a law to expropriate the subsoil, and a lot of foreign capital had arrived to the country. With the new legislation, the Government wanted to have Spanish investors reach parity with foreign investors (as it currently happened in the Basque steel industry), and perhaps majority.
Railway legislation was also developed. In order to reduce the costs from the construction of the first Spanish railways, a plan was started to make railway tracks as straight as possible (pre-revolutionary legislation gave subsides to railway construction businesses proportional to the number of built km, which tended to influence the construction more than what would be useful), increasing as well the number of connections between cities, in order to turn what had been a centralized network into a mesh net, favoring people and merchandise transport between cities, as well as communication, next to an extension of the telegraph network to reach a greater number of Spanish towns.
Another particularly thorny matter was also taken care of, that of the almost chronic illiteracy that still plagued the nation: in 1871, more than half of the sixteen millions of Spaniards was illiterate. This was owed to the disdain toward the main population's education by the high classes since the times of Carlos IV, as nobility did not want the French Revolution to expand into Spain, and considered that the best way to keep the population controlled was to restrict their access to any kind of subversive literature, a policy that had continued during Fernando VII's and Isabel II's reigns. In order to give greater backing to the strengthening of the Spanish nation and democracy, the Ministry of Public Instruction was created, which directed an ambitious program of adult literacy and child education. Most people knew that it would be a lot of time until the efforts to educate the nation gave their fruits, but they also knew that those efforts would be worth it, and that they would surely be successful.
 Cosme García Sáez is one of Spain's forgotten geniuses. Born in Logroño in 1818, he was the first Spaniard to invent a submersible, the Garcibuzo. Its first trials happened in 1859, the same year Narciso Monturiol made his first trials with the Ictíneo I. García Sáez devised many improvements and built many machines of different kinds, working in the Spanish Royal Mint. One of his greatest inventions was a great quality breech-loading carbine that could shoot more than 3,000 times without having its mechanism fail or requiring to clean the weapon. Due to the lack of support, first from Isabel II and then from the Provisional Government, he ended up poor and living from alms, dying in 1874. Of course, in this Alternate History García Sáez has a job and lives beyond 1874 as he recovers the hope and excitement in life.
Part IV: The Tercios Especiales
Spain's relationship with Japan had relatively recent roots when compared to Spain's relationship with other nations. The first contact between Spain and Japan was established on 1549, when Jesuit Saint Francisco Javier arrived to Kagoshima in order to spread the Word of God in southern Japan. The daimyo who converted to Christianity sent shortly after the Special Mission "Tensh Ken-oh Shisetsu" to Europe, which was received by King Philip II of Spain on its way to Rome. In 1614, a similar mission led by Tsunenaga Hasekura  as received by Philip III. After the Tokugawa Shogunate, it would take two centuries and a half for both nations to re-establish contact, despite the relatively short distance between the Philippines and Japan: finally, in 1868, the Meiji Government decided to once more contact Spanish authorities, which eventually allowed the signing of the Spanish-Japanese Friendship and Trade Treaty.
In 1871, Japan was still in the middle of restoring his control over the dominions of the daimyo, which were now just landowners, at the same time that he tried to modernize his nation to take it to a level similar to the Western powers. When the news of the Spanish-German victory in the Hohenzollerns' War arrived to the Imperial Palace, the Emperor felt intrigued by the two nations that had defeated such a great foreign power as France, and ordered his ministers to establish communications with both nations to ask for their help in modernizing Japan, as well as the possibility of having meetings with the diplomatic representatives of both nations.
In order to avoid a diplomatic nightmare due to etiquette mistakes, the Spanish ambassador and some of his attachés spent several days studying the Japanese culture with the help of several local people, who helped them understand certain complicated matters. One of the military attachés was Gregorio López Jiménez , who, while learning about Japan, managed to establish a friendship with the man that was helping him the most. The name of the man was, unfortunately, lost in the mists of time, but what is known about him is that he was a former samurai, and that López learned much more about the Japanes culture than what he expected: among other things, he learned the Bushido, the samurai warriors' Honor Code.
The interview took place some time after, and finished successfully: the Emperor felt flattered that both Spaniards and Germans had taken great efforts to learn both the Japanese language and culture, even if that knowledge was not too great, and confirmed the friendship treaties with both nations. However, the consequences that encounter brought were greater than what would be expected.
The military attaché had to return to Spain a few days after the interview was celebrated, due to family problems. Once he was back to Spain, one of the things he did was to attend a party, one party that was also being attended by famous Carlist general Ramón Cabrera, who was visiting Spain at Prim's invitation. Gregorio López and Ramón Cabrera met, and their conversation was full of anecdotes about the former's stay in Japan, among them his discovery of Bushido.
Ramón Cabrera, who, in spite of having been away from the battlefield for twenty years, still conserved his military brilliance and inteligence, had an epiphany, a grandiose idea that could chance the concept of wars as they worked, as well as giving Spain a new weapon to use against any potential uprising, one weapon that, if used well, could help take down any enemy of Spain.
Two days later, more than enough time for Cabrera to flesh out some of his ideas, the ancient general met with Minister of War Prim. Cabrera would then present him the idea he had just had: the formation of an elite corps trained in a kind of combat not used by the regular army, that of guerrilla war. Said corps would be trained in knowing how to eliminate supply trains, hide in any place, launch hit-and-run attacks, traverse any field... and they would also hold to an honor code that would be similar to that of the samurai. This elite corps, Cabrera said, could be used as a powerful weapon against any enemy, to break down its moral through attacks that they would never know where or when they would come, but it could also be used to fight fire with fire against any uprising, such as that of the Cuban Independence supporters.
Prim felt reluctant to accept the old general's idea: on the one side, this man had fought against the legal queen, Isabel II, to instaurate the absolutist monarchy of Carlist pretender Carlos VI in 1846 - Prim may have done the same twenty years later, but at the time there had been still hope for the Queen to enforce a democracy - and had supported the pretender for years; but, on the other side, he had broken off with Carlos VI and VII, during the war with France he had been a fundamental support to prevent the Carlist to join the invaders and had, since then, exhorted all other Carlists to accept Leopoldo I as the King of Spain. Of course, that did not have anything to do with the idea, which was very attractive: as far as he knew, no other country in the world had an elite corps of soldiers similar to what Cabrera was presenting him, and, besides, the potential the idea had was impossible to calculate.
Thus, on September 29th 1871 , generals Serrano (as President of the Government), Prim (as Minister of War) and Cabrera met with King Leopoldo. Cabrera explained his idea again to the King, Serrano and Prim, adding several important details he had polished after his first encouter with Prim. The King and Serrano, although initially reticent, ended up enthusiasmed with the idea. Serrano, particularly, had seen on first hand the damage the Carlist requetés had caused against the French during the war, and agreed with General Prim in the formation of the new elite corps.
However, when asked to lead it, Cabrera chose to decline the honor: since twenty years before, his life was in London, next to his wife Marianne Catherine Richards, and did not want to come back to live in Spain again. He might come from time to time to check on how the group was working, but active military life was in his past, and did not want to return to it. The King accepted it, and asked him to write down his ideas and the honor code the corps would have to follow, so that the people could read it .
Several days after, Cabrera was going back to London, and the government approved, in a secret session, the creation of the Tercios Especiales. Before they knew it, the Tercios would enter in action against an unexpected enemy.
 According to the legend, several of Hasekura's companions chose to stay in Spain, to be more exact in the town of Coria del Río, Seville. In RL, there are about 600 people in that town with the surname "Japón",Japan, who are probably the descendants of the Japanese envoys.
 Invented name.
 This is the reason why the Saint Patron of the Special Tercios is Saint Michael, General of the Holy Armies.
 The document written by Cabrera would be preserved in the first Special Tercios Headquarters, and nicknamed "The Tercios' Bible".
Part V: 1873, Annus Horribilis
The first two years of Leopoldo's reign had been quite placid. The war in Cuba was still there, of course, and had yet to be solved, although the use of new weaponry and new tactics and the arrival of veteran soldiers from the Hohenzollerns' War was starting to turn things around in favor of the Spanish regular army. With the arrival of January 1st 1873, many expected that Leopoldo's reign would continue improving, and that many of the problems that plagued the nations from so much time before would soon end.
Very few could have predicted that, against what was expected, 1873 would be, without a doubt, one of the worst years of Leopoldo's monarchy: future historians would not doubt in marking 1873 as an Annus Horribilis for Leopoldo.
It all started in the mountains of northern Spain, in the Navarran Pyrenees, which during part of the nineteenth century had been one of the main scenarios of the Carlist Wars. In those mountains the last Carlists that remained faithful to Carlos VII - whom they still regarded as the legitimate King of Spain - met. The division of Carlism in two due to Carlos VII's support of a French invasion had made them stumble, and it had taken them those two years to recover from the situation and plan a meeting to decide what to do.
One of the leaders of the Irredent Carlists - as they would be called later by the government, their former allies and the press - was Manuel Ignacio Santa Cruz Loidi, better known as the "Mad Priest Santa Cruz", who, in spite of being a priest, was among the most violent and cruel Carlists, not only against his enemies, but also against the innocent people whose only sin was to be near where he was and not support his cause wholeheartedly. His flag, black, with a skull and two crossed bones, and the motto "War Without Mercy", was but a symbol of his extreme brutality.
It was Santa Cruz who suggested the idea of launching a new Carlist uprising. Since there were a great number of Spanish troops occupying southern France, and another great number in Cuba, that left few soldiers in Spain proper, so it would not be very hard to initiate an uprising, and soon their successes would bring many more people to the Cause and help topple the Prussian usurper. The remaining men in the meeting were not very sure of whether it would work, but Santa Cruz's frenzied speeches about the "traitors" - as he called Cabrera and the other Carlists that had retired their support for King Carlos - made them accept Santa Cruz's proposition. Very soon, the government started to receive messages about disturbs in Navarra and the Maestrazgo , as well as a great number of deaths, which could be easily attributed to the Carlists that had yet to depose their weapons.
These news could not have arrived in a worse moment for Francisco Serrano's government, as bad news were accumulating at a great speed: Barcelona and Perpignan were suffering almost weekly revolts that claimed for the establishment of a Federal Republic, which the Republicans in Congress swore they had nothing to do with, and which could hardly be contained by the police corps: the almost constant advance in Cuba in the last two years had stopped almost suddenly, as the number of machete charges, developed by independentist Máximo Gómez and feared by the soldiers due to their brutality, stepped up; in France, the Third Republic was having great internal conflicts due to the conflicts between those that supported the Republic and the increasing number of monarchical supporters, conflicts that partially affected the Spanish soldiers in southern France, while in Corsica disturbs in favor of a re-establishment of the Bonaparte monarchy were becoming harder to control; and peasant revolts, due to the spread out of anarchist and marxist ideas coming from the International, were happening almost daily. The Philippines were also becoming the center of some problems due to its strategical position in the middle of the Pacific, the problems with the Moros of Mindanao and the slowness with which reforms were arriving, due to the iron-clad opposition of the elites in there, who were opposed to anything that changed the almost feudal regime which still reigned in the archipelago.
Considering the Carlist revolts as the most dangerous and immediate problem, Serrano sent several thousands of troops to the places where the two groups of Carlists were acting, in order to find them and arrest them for their posterior judging. However, the Carlist rebels' mobility was much higher than that of the regular troops: many times, the only thing the soldiers could find were burning huts and several bloodied bodies on the floor. Sometimes, they did manage to find survivors, who could tell what happened, but the information was almost always useless. A couple of times, the rebels, thinking themselves invincible, launched direct attacks against the soldiers, but the latter always ended better in this situations, as they mostly just suffered injuries while the attackers died, were captured, or ran away.
The constant bad news coming from so many fronts at the same times were slowly mining the trust of the people and the Congress of Deputies in the Government. Serrano's attempts to pass important legislation and find support for their approval were finding more and more obstacles as time passed, especially among the members of the National Union's Progressive wing, although the Democrats were also starting to make their opposition known.
The moment everyone would mark as Serrano's presidency's death spell was the "Virginius Affair". The Virginius was an old blockade-breaker that had been captured by the United States Government during the American Civil War, and had been bought by John F. Patterson, who was using it to sell contraband items to the Cuban rebels. When it was sailing near the coast of Jamaica toward Cuba, the ship was captured by the Spanish corvette Tornado on October 31st and towed to Santiago de Cuba, and its crewmen and passengers were arrested. Several of them, amongst them the Virginius captain, Joseph Fry, were judged in a military summary trial, accused of supporting the rebels and shot. Nineteen people ended up executed by death squad. Several more could have suffered the same destiny, but colder heads had prevailed and they were only condemned to prison.
Either way, the diplomatic storm that was created by this affair was brutal. The United States Ambassador was demanding an explanation and apologies from the Government almost daily, and the United Kingdom protested, both because one of the executed men was a British subject and because the Spanish ship had acted near British waters. Within Spain, Congress was asking Serrano for an explanation over the matter - a matter that had caught Serrano completely by surprise, because by the time the news of the whole thing had arrived to Spain, the executions had already happened - and some deputies were even subtly indicating that they planned to aask for a motion of no confidence against the President.
Serrano, however, knew that he could do nothing to appease his critics, and decided to cut his losses before it was too late: on November 15th, he presented his resignation to the King, who accepted it. Between that day and the election day, which would be in April 1874, Prim would take charge of the Presidency.
For a few days, war between Spain and the United States seemed imminent - which was probably what the Cuban rebels, and perhaps the French, hoped for - but fortunately, in the end everything became just a diplomatic problem. On December, Spain returned the Virginius to the United States - which, ironically, sunk on its way back to its port of origin in -?-- and it gave the rest of the crewmen and passengers to a United States Navy warship, although several of the cubans that travelled in the ship remained imprisoned, as there was proof of their relation with the rebels. Finally, on January 1875, Spain indemnized the United States Government with $20,000 for the executed United States citizens, and the British Government with $2,000 for the only executed British subject.
 The Maestrazgo is a region in eastern Spain, divided between Aragon, Catalonia and the Valencian Community, full of mountains and forests. This region had also been a place where Carlists acted in the First and Second Carlists Wars.
Part VI: The End Of All The Wars
The Virginius Affair made it clear for Prim and the rest of the government that the Cuban rebellion had to be cut off and destroyed befor the United States decided to meddle where they were not called, as well as the Irredent Carlists, who had rejected the Patriot Carlists' calls to surrender, calling them traitors to their true King.
Fortunately, many of the other problems started to be solved along 1874: the republican problems in Rousillon and Catalonia were slowly going down as the government started to expand on previous efforts to bring freedoms to the people, and the peasant revolts became finally easier to control and stop. The French situation had worsened enough for the republican government ceded to the public's pressures and resigned, allowing the election of a new government that soon proclaimed the restoration of the Kingdom of France. The old legitimist pretender, Henri V, did not see how this happened, as he had died of a heart attack two days before said proclamation. This opened the way for Philippe, son of Louis-Philippe I (who had been king during the so-called "July Monarchy" between 1830 and 1848) and older brother of the Duke of Montpensier, to become the king. Philippe accepted the government's call, and he was soon crowned Philippe VII of France, with the support of the Spanish and German government, who soon saw how the situation calmed down in France.
The island of Corsica, however, was not willing to fall once more under the control of a king that was not a Bonaparte, and rebelled. The rebellion soon smashed the few French troops in the island and formed a revolutionary government that called Napoleon IV, the last French Emperor, to lead them, which the young man and his mother accepted.
For a time, Napoleon IV dreamt with the possibility of taking control of an army and carry it to southern France, thus winning the French people for his cause just like his grand-uncle had done in 1814 when he came back from the island of Elbe, but was soon told it was impossible: the current presence of Spanish and German troops in France would smash any attempt by him to restore Napoleonic rule over France. Equally, the French government met to choose what to do with the Corse rebellion, weighing the idea of sending troops to smash the rebellion, but they realized they could not do anything, given the current situation, and chose to let Corsica take an independent route, even if officially it remained a part of France.
While the French matters took their own route, Prim knew that he had to solve Spain's own problems. The nearest was that of the Irredent Carlists, and would not be easy to solve. However, Prim now counted with a secret weapon, completely unknown by the general public, and especially the Carlists: the Special Tercios. After two years of training, the six platoons of the Special Tercios (all of them named after a Spanish military hero: Viriato, Don Pelayo, Rodrigo Díaz de Vivar, Gonzálo Fernández de Córdoba, Hernán Cortés and Francisco Pizarro ) were itching to finally enter battle, whomever it was their objective. Their search of the Irredent Carlists would be their fire baptism, and if they managed to get through and be successful they would be sent to Cuba.
One platoon of the Special Tercios was formed by 60 soldiers, divided in four squadrons of 15 soldiers each, and each squadron was divided in three squads of 4 soldiers and one squad of 3. All of them were armed with RESA 1871 rifles and ammunition for several combat days, as well as a pistol and a saber for melée combat, although they had been trained to be able to use any weapon, so they would be able to take the enemies' weapons and use them against them. The smaller squad were also trained in the uses of field medicine, so they could take care of the immediate healing of any member of their squadron that were injured. The other squads also had small specializations, like long-distance sharpshooting.
The Special Tercios' first mission started in January 1874. Platoons Viriato, Gonzalo Fernández de Córdoba and Hernán Cortés were sent to Navarra to deal with the Carlist rebels in the zone, especially the group led by Santa Cruz, which was considered the most dangerous and problematic, while platoons Don Pelayo, Rodrigo Díaz de Vivar and Francisco Pizarro went to the Maestrazgo. Their main orders were to find the hideouts, count how many fighters the Carlists had in the zone and then send a messenger to the nearest Army barracks, so that a group of soldiers big enough to face the Carlists was sent to their hideout, while the Tercios made sure that the rebels did not catch wind of what was happening.
However, soon it became clear that whomever had given those orders did not have much of an idea of the great stubbornness and potential of the soldiers that formed part of what would be considered the world's first special forces.
The first (and last) news the Pamplona barracks received of the efforts of the Special Tercios to help find and arrest the Carlist rebels was when, three weeks after the Tercios arrived to the region, a messenger arrived, saying that in the outskirts of the city stood 180 soldiers watching over the 150 Carlist prisoners and 100 corpses they had brought from the Navarran Pyrenees, and were asking for help to secure the prisoners for their subsequent imprisonment. The barracks' commander could only order his secretary to send a telegram to Madrid, telling the events and asking for orders, while he personally led a 500-strong corps in order to finally imprison the arrested Carlists. Once there, he managed to identify one of the corpses as that of Santa Cruz, who had chosen a fight to death before surrendering to the troops.
Some time later, the city of Teruel (the one nearest to the Maestrazgo) received a similar visit, with 200 prisoners and 75 corpses: the proportion between prisoners and dead was higher because the Carlists in the zone did not have Santa Cruz's fighting spirit, and several of them chose to surrender when they realized that running away or winning would be impossible.
When these news arrived to Madrid, they did so in the moment Prim really needed good news, because he was in the middle of trying to solve the problem the division of the National Union Party was causing for him (see Part VII: The National Dis-Union). In the next meeting of the Congress of Deputies, he presented the news of the end of the Carlist threat, and he was met by an applause of the whole chamber. His next suggestion, that the soldiers of the Tercios received decorations and medals for their great -hazaña-, was probably the last thing all members of the Lower Chamber agreed with, and thus voted in favor of awarding every soldier special medals.
In a ceremony attended by the Spanish Royal Family, the whole government and Generals Serrano and Cabrera (the latter had come on purpose to proudly see how the soldiers of the group he had developed three years before, and that followed the honor code he had devised, finally won the first rewards for their effort), as well as the soldiers' families, the King and the Prince of Asturias  personally gave each soldier a Military Merit Order of the two higher classes, as well as a medal crafted especially for their role in ending the Carlist threat, denoting the great efforts all of them had spent in those three weeks.
Festivities were short, as they soon were put into a ship to Cuba. The long travel between El Ferrol and Cuba was incredibly boring for all of them, so, as soon as they disembarked in the port of Santiago de Cuba, they established a base and jumped to the interior of the island so that they could fulfill their orders.
Their first success arrived very soon: an incursion toward the interior of Sierra Maestra, nearby Santiago, allowed them to capture Carlos Manuel de Céspedes, who had been the leader of the Cuban independence movement until october of 1873, and his son Carlos Manuel. Both were soon taken to the city of La Habana. There, the old general's bad health and blindness and their nearly null importance for the rebels' government - obvious because the Céspedes had not had any kind of protection - made the judge take compassion of them both and condemn them to several months of home arrest in a home of La Habana. This capture would, however, be used by the Spanish Government and the troops as propaganda, because Céspedes had been the one who had started the Cuban rebellion after the Grito de Yara and yet the rebels had badly mistreated the man, who could only now count on the compassion offered to him by the Spanish people.
Some time after, Dominican Máximo Gómez, who had taken control of the rebel forces after Céspedes was dismissied, fell dead: he had been the last victim of the ability of one of the Special Tercios' sharpshooters. The sudden death of something they had not seen caused panic among the Cuban troops that were near Gómez when he was killed. This panic was taken advantage of by an army that had been organized especially for the capture of Gómez's troops, and very soon most of them had died or been captured.
The next weeks did not bring any more important deaths: however, that did not mean that the Special Tercios were not active. Far from it, they continued with their campaign of putting traps, ambushing and killing from afar to continue undermining the rebels' confidence and they capacity to make war. The regular army, animated by the victories they were obtaining and the support of the Tercios, managed to take the initiative in the war once more.
It took four months since the arrival of the Special Tercios to Cuba, by which time the Maceo Brothers  and Calixto García where the leaders of the Cuban independence movement. The three men, after much debate, realised that their position was becoming impossible to maintain, and surrendered to the evidence, sending a message to La Habana, asking for an armistice between the rebels and the Spanish government so that a peace treaty could be signed. In those four months, a government had fallen and another had taken the reins of power, but few could say that those four months would be among the most important in the history of Spain.
 Viriato (or Viriathus) was a Lusitanian warrior who fought the Roman Republic when they invaded Iberia; Don Pelayo was the Asturian noble who defeated the Arabs in Covadonga, allowing the establishment of a Christian redoubt in northern Spain, which would be the beginning of the Reconquista; Rodrigo Díaz de Vivar was the famous Cid Campeador, who was portrayed by Charlton Heston in the film El Cid (although that film is mostly based on the Cantar de Mío Cid); Gonzalo Fernández de Córdoba was more commonly known by his nickname, El Gran Capitán (The Great Captain), who fought in the conquest of Granada and in Italy and is considered by many as the Father of Trench War; Hernán Cortés was the Conquistador that took on the Aztec Empire and defeated it, and Francisco Pizarro was the Conquistador that took the Incan Empire down.
 The heir of the Spanish Crown.
 Do not confuse them with the Mario Brothers. Those two are Italian plumbers, the Maceo Brothers are Cubans.
Chapter IV, Part VII: The National Dis-Union
Spain had faced its first fire test, and had overcome it stronger and more united than ever. However, the conflicts caused a great loss: the National Union Party. Although the members of the great coalition had agreed that the party would have a limited life, that did not mean that the implosion was less impressive.
The first signs of the National Union's cracking had been seen after the “Virginius Affair”, when the party's Progressive wing had threatened to ask for a vote of no confidence against Serrano. Since then, fights in Congress between the Conservative and the Progressive wings of the Union became more frequent: at some points, some of its more ardent members had to be held back by their companions to prevent a fistfight to start. Finally, on February 1874 it was clear that all collaboration between both sides would be next to impossible. In the end, the leadership of the party agreed that, until the Courts were dissolved, the National Union would remain together, but starting at that point, the split would become a reality.
And that was what happened on March. The Courts were dissolved, to prepare for the elections that would happen a month later, and soon the dissolution of the National Union was published in all the nation's newspapers, making a reality what had just been clear to everyone but those that did not pay attention to the comings and goings of the politicians in Madrid.
The Conservative wing became the Liberal-Conservative Party, which mostly attracted the members of the old Liberal Union, as well as the most conservative members of the Progressive Party. The new party also merged with Antonio Cánovas del Castillo's Conservatives and Alejandro Mon's Moderates, forming what could be called a center-right party. Its first leader was, after a voting, the charismatic Antonio Cánovas del Castillo, because Francisco Serrano had announced that he would leave politics while he remained in the Army, in accordance to the Pacto de los Heros, but that he might make a return when he eventually retired.
Meanwhile, the Progressive wing of the National Union, formed by most of the old Progressive Party and the Democratic Party, formed the Democratic-Radical Party. Led by Práxedes Mateo Sagasta, Manuel Ruiz Zorrilla and Cristino Martos (with Juan Prim ostensibly leaving politics but still handling things in the shadows), this party, of center-left tendencies, also attracted several members of Emilio Castelar's Republican Party, who were ready to accept King Leopold as long as they could have some influence in the advance of Spanish society, as well as other people from many minor parties
These were not the only parties that would appear in that year: a small Progressive Party was formed by several members of the old party of the same name who did not agree with Sagasta and Ruiz Zorrilla's theories; a Federal Republican Party split from the Republican Party, as Castelar supported an Unitary Republic similar to the one that had existed in France until the proclamation of the Second French Empire, and the Catholic-Monarchic Communion split in two, giving birth to the Integrist Party and the Traditionalist Party, due to differences in who they supported and their opinions.
The elections of April 1874 gave the next result:
Democratic-Radical Party: 217 deputies
Liberal-Conservative Party: 128 deputies
Republican Party: 19 deputies
Federal Republican Party: 10 deputies
Integrist Party: 8 deputies
Progressive Party: 8 deputies
Traditionalist Party: 1 deputy
Non-established: 29 (Cuba and Puerto Rico)
With an absolute majority in their hands, the Democratic-Radical Party could soon start to work and put their plans for the Kingdom of Spain into action.
In the first place, the Irredent Carlists were judged. All of them were declared guilty of terrorism and treason to the Crown. Several of them were condemned to prison sentences between twenty and fifty years, others were condemned to forced labour in the colony of Guinea, and the last few, the surviving leaders, had been condemned to death by hanging. The sentences were carried out immediately, in order to avoid more problems.
Another important matter was Cuba. After the rebels' message was received, General Arsenio Martínez-Campos, the leader of the Spanish Army in Cuba, and who had supported a double politic of harshness against the intransigents and of tolerance with those that supported negotiation, ordered all armies in Cuba to stop moving and not to attack unless they were attacked, while a place to make the negotiations was chosen. The chosen place was the city of Mangos de Baraguá, because of both its centric position in the island as well as its being near to the coast. The main leaders of both sides met there to decide the conditions by which the rebels would lay down their weapons. On July 7th 1874, the peace agreement, which was called the Compromise of Baraguá, was signed:
The Spanish Government concedes the amnesty to the rebels, frees those rebels who are imprisoned and lifts the exile sentence to those it was applied to.
The rebels lay down their weapons, renounce to armed fight and accept the Spanish Government as Cuba's legitimate government.
Anybody born in Cuba or who has Cuban parents is a legitimate citizen of the Kingdom of Spain and has the same rights as all other Spaniards.
Slavery is abolished: those slaves who worked in the rebel armies will be declared free men, and all other slaves will be freed before two years have passed .
Cubans may join the Spanish Army and be promoted like their Spanish counterparts, independently of their race.
Cubans may meet freely, vote in the local and national elections and form their own political parties (as long as they do not call for war against the legitimate government
Cuba will become a Foral Region .
The terms were not the ones the rebels wished, as their main demand was Cuban independence, but they knew that they were in the losing side, that said demand would have been completely rejected by the Spanish government and that any attempts to insist on it would be met with their own destruction, so they accepted. Anyway, the last point would give them a certain degree of autonomy from Spain, which had been among their initial demands, and they were willing to take in order to help Cuba reform, so they accepted. A few days later, Sagasta's government approved the same pact.
The concept of Foral Regions was the brainchild of Sagasta, who had envisoned a reform of the whole nation into what would, in the future, be called the Foral State : the size of the Kingdom of Spain, with far-flung territories in Cuba, Puerto Rico, Guinea and Philippines made the administration of the whole national territory from Madrid very complicated. Thus, Sagasta's government decided to restructure the national administrative system in order to ease the interaction between the government and the people.
Spain would be divided in regions, all of which would have a grade of administrative autonomy, similar to the one that had been recently applied in the Vascongadas and Navarra, replacing the old fueros. Some regions would be granted the possibility of teaching local languages in schools - Catalan, Basque, Galician. The overseas regions - only Cuba and Puerto Rico for now, although the government expected to be able to act with more strength against the Philippine local elite and finally cut off all of the power they had in there, and Guinea was currently too small to even think about it - would also be granted self governance in most internal matters, because of their remoteness from the metropoli, an idea that might also be applied to the Peninsular regions if it was successful. Granting autonomy would ease the government's work, as they would be able to act at a greater scope while the regions acted at a local level, and at the same time the central government would be able to keep political control over the whole nation, as they reserved the right of inverting or stopping any reforms made by regional governments that contradicted those decisions taken by the government in Madrid.
While neither Cubans nor Puerto Ricans had been able to vote on the new government, in three years they would finally be able to choose their own representatives to the Congress and their own Governor.
 This term did not fall well among the slave-owning aristocrats in the western half of the island, but, besides some sterile protests, they did not act against the slaves' manumission, because they knew any heavy protest would immediately backfire on them.
 The world Foral comes from Fuero, which comes from the Latin word Forum, an open place that served as market, court and meeting place. However, Fuero, in this case, means a series of rights and laws the kings and nobles gave to certain cities in order to attract people to them.
 As a counterpoint to the State of the Autonomies that exists in today's RL Spain.