Now this is indeed a challenge.
After Santa Anna began to repeal the liberal reforms of Valentin Farias, he had the Congress dissolved and a new centralist form of government was installed. This angered many states of the country, who demanded that a federalist government be reinstalled, and resulted in Texas declaring its independence.
Santa Anna would personally lead the force that tried to put down the rebellion in Texas, winning several early battles. However, he foolishly got himself captured by Texan revolutionaries following the Battle of San Jacinto and forced to concede Texan independence. This act resulted in his removal as president by the government in Mexico City.
Upon his return to Mexico a year later, Santa Anna would take up residence at his hacienda in Veracruz. When France invaded to recoup the financial losses of French investors in Mexico, Santa Anna would lead a defence of the city of Veracruz, during which he lost his leg. Though the French would win this war, Santa Anna's popularity skyrocketed, and soon after he was reinstalled as president.
Santa Anna's rule this time would be his most dicatatorial yet. He suppressed all opposition to his rule, and raised taxes to refill Mexico's depleted treasury. He also sent a military expedition north, in an attempt to regain Texas. However, this expedition failed, resulting only in many Texans seeing a need to join a larger country for protection. They initially sent out feelers to the United States, but political gridlock in the US Congress prevented any action towards annexing the young republic. So the Texans turned to their largest financial backer and investor: the British Empire. The British agreed to an alliance with the Texans in exchange for favourable access (read: virtual elimination of tariffs) for British goods.
Having had enough of Santa Anna and his dictatorial centralist government, the states of Yucatan, Coahuila, Nuevo Leon, and Tamaulipas declared their own independence, the latter three joining together in the Republic of the Rio Grande. The Rio Grandese were easily crushed by Santa Anna. However, the Yucatan was a much harder nut to crack. The lack of any land routes to the capital, Merida, or to the fortified city of Campeche, meant invasions had to come by sea.
It was during this naval assault that events took a fortuitous turn for the rebels. Texas, feeling sympathy for their revolutionary brothers in the Yucatan, was the first country to recognize its independence. The Texas Navy was sent to help protect the new republic. Unaware that an enemy fleet was approaching, the Mexicans began their attack on the city of Campeche. While in the midst of their attack on Campeche, the Texan Navy arrived, surprising the Mexican navy at its rear. The resulting battle was a Pyrrhic victory for the rebels, and the Mexican navy was sent to the bottom of the sea alongside much of the Texan. The invasion of the Yucatan was thwarted. Furious, Santa Anna embargoed the Yucatan.
The loss of trade with "mainland" Mexico resulted in a severe economic depression in the Yucatan. This accentuated the divide between the partisans of Merida and Campeche, and both of them would soon declare themselves to be the rightful government of the republic. At the same time, the Maya, who formed the bulk of the manual labour and military muscle in the republic, began an uprising against white rule.
Terrified of the Maya and economically depressed, the government in Campeche under one Santiago Mendez, sent delegations to London and Madrid, offering Yucatan's sovereignty in exchange for assistance in putting down the Mayan rebellion, with the hope that being part of a larger empire would ease their economic woes. The British, always eager to expand their empire, agreed to assist.
This proved costly. When a British army landed in the Yucatan to hunt for the Mayans, they soon found themselves ill suited for the task. Many thousands of British troops would succumb to disease, and nearly as many were picked off by Mayan guerrillas. But the under equipped and usually malnourished Mayans proved no match for British regulars in open combat, and Chan Santa Cruz was captured. Loss of life on the British side was great, so great that London refused to continue the war after the capture of the enemy capital. Garrisons were left in the major cities and forts constructed at key points, and the war was declared over. While the bulk of the Mayan force was broken at Chan Santa Cruz, sporadic fighting in the countryside continued well into the 20th Century.
With both Texas and Yucatan under protection of the mightiest empire in the world, the Mexicans had no choice but to finally recognize both as independent from Mexico, doing so in the Treaty of Kingston, signed on February 9th, 1849.
Having had enough of the incompetent and increasingly delusional Santa Anna, a group of liberals lead by Benito Juarez overthrew "His Most Serene Highness" and sent him into exile. Santa Anna would die in Cuba a little over a year later, by what many suspect was a poisoning. The "Napoleon of the West" was dead, in a manner suspiciously similar to that of the actual Napoleon.
In the United States, the anti-immigrant, anti-British, and anti-Catholic American Party candidate, Millard Fillmore, won the election of 1856, and his party swept the House and Senate. Hostile to the Empire since it "stole Texas from its rightful American owners" and effectively hemming in US expansion in the south and north, the US began a large-scale military buildup ahead of a planned war with the Empire. It was hoped that the US could rapidly take Texas and the Canadian colonies before British reinforcements could be sent, forcing the British into an early peace and acquiring new lands in the south and north for the US. It was also hoped that the war would divert attention away from the slavery issue that was increasingly dividing the US.
Not going unnoticed, the British responded by preemptively sending reinforcements to the Canadian colonies, increasing the strengths of the squadrons of the Royal Navy along both the Atlantic and Pacific coasts, and raising a large number of militia in the colonies. Texas too mobilized its militia. In an attempt to avert the looming war, negotiators were sent to Washington. While all signs coming from the city proved hopeful a peaceful resolution could be reached, the negotiations turned out to be little more than a diversionary tactic.
The Third Anglo-American War broke out in 1861. The invasions of the United Colony of Canada were stalled by the defending troops at the same points they were during the war fifty years previous, the invasion of New Brunswick succeeded in occupying Saint John before being stalled at Moncton, and the Americans were routed in their attempt to invade British Columbia by native auxiliaries on the payroll of the Hudson's Bay Company and the powerful Pacific Squadron. The invasion of Texas was more successful, with Houston falling early and Austin finding itself under siege. On the seas both sides traded victories. The thinly populated lands of the Hudson's Bay Company fell rather easily to the invaders from Minnesota.
Relief for the Texans came from the British garrisons of the Yucatan, who sailed north soon after the fall of Houston. Slave rebellions began to take place as British agents infiltrated the South and promised freedom for every slave to take up arms against their American masters. Soon after the plains tribes began to fight the Americans as well, promised independent lands of their own by the British in return for their assistance. Finding themselves overstretched and unable to both maintain pressure attacking north and south and trying to suppress the uprisings on their own lands, the US sued for peace just three years after the declaration of war, with the Treaty of Utrecht. No territory was exchanged, but the US recognized the borders of the colonies of British North America and surrendered any claims on any lands of the British Empire and her protectorates.
A meeting of the colonies of British North America at Quebec City took place the next year to discuss a union. The war and the political climate showed the US was a dangerous, albeit unstable, neighbour. The costs of defence would be lessened and the collective strength increased if they all combined their resources as one unit. The colonies in the West Indies found themselves pressured by London to join the talks, as the war with the Americans proved costly for the British as well, and London was eager to lessen the financial burden of its colonies in the Americas.
Mobilizing such a large number of troops and having its trade interfered with for years resulted in Texas teetering on the edge bankruptcy. The Yucatan too had its trade molested, which hurt it even more as the peninsula had never quite recovered from the economic impact of secession from Mexico. Both elected to send delegates to the Quebec Conference. While initially hesitant to give up their sovereignty to the Crown, both republics saw the benefit of full protection by the British military and full access to the markets of the Empire. What really sold them was the offer of assumption of debt by the federal government.
On July 1, 1865, the Kingdom of Canada was established, composed of the states of Nova Scotia, New Brunswick, Newfoundland, Quebec, Ontario, British Columbia, Texas, the Antilles (island colonies of the lesser Antilles combined as one), and Yucatan. Prince Edward Island, Jamaica, and the Bahamas would eventually join over the next decade and a half, and British Honduras was combined into the Yucatan state.