When carpenter John Marshall struck gold at Captain John Sutter’s saw mill (pictured), it marked the beginning of the California Gold Rush. United States Library of Congress, cph.3c37164

The American Civil War was a time of great unrest in the young country; the nation was torn apart and loyalties were tested. And although the newly-admitted state of California was unable to contribute much in the way of soldiers given its distance from the eastern battlefields, it did play a hand in helping to finance the Union’s eventual victory, thanks to the local mining industry.

In January 1848, a carpenter named James Marshall struck gold while working at Captain John Sutter’s saw mill east of Sacramento in Coloma, California. “Marshall took a rag from his pocket, showing me the yellow metal: he had about two ounces of it; but how quick Mr. M. put the yellow metal in his pocket again can hardly be described,” Sutter later wrote. Sutter tested the quality of the metal with “aqua fortis” – nitric acid – and “declared this to be gold of the finest quality, of at least 23 carats.”

Marshall’s find was not particularly significant for its time; gold had already been found at San Fernando, near present-day Los Angeles in southern California. But as more and more gold was found in northern California throughout 1848, rumours began to spread.

In an address to Congress in December, President James Polk confirmed those rumours – and the following year, 1849, became synonymous with prospectors heading west to make their fortune.

Gold became the foundation of the California economy at the time. During the 1848-1855 Gold Rush, California mines produced 11 million ounces of gold. Some miners tried to exchange it for goods and services as a currency, though gold dust was difficult to measure, and the purity of nuggets and dust widely varied. Eventually a more reliable system of private banking emerged, whereby these banks would exchange gold for paper notes.

RELATED: The rise and fall of the gold standard

When war broke out in 1861, the American government’s finances – and its ability to pay for a war – were also tied to gold.

The Civil War cost the northern Union states $59 billion in 2011 U.S. dollars, making it the most expensive war in the history of the country at the time. The Confederate states, made up of the thirteen Southern states that seceded between December 1860 and November 1861, spent over $20 billion.

The government’s debts could only be repaid in gold at the time – before the Civil War, the federal government did not issue paper bills – so the Union needed a great deal of gold to pay for supplies including weapons, food and uniforms for its army of two million soldiers. It is unclear exactly who was behind the decision to move gold from California to the East Coast, but move it did.

Ships left the Port of San Francisco once or twice a month with between $1 and $2 million in 1860s U.S. dollars of gold on board. During 1864 alone, $46 million of gold was sent east. In addition to supplies, the gold may also have supported the government’s currency as more paper money came off the presses. California gold miners also contributed 25 per cent of the total raised for the Sanitary Commission, an organization that paid for medical care for Union casualties, in individual donations.

“I do not know what we would do in this great national emergency were it not for the gold sent from California,” Union General – and future U.S. President – Ulysses S. Grant said.

Gold was the essence of California’s wartime contributions; it was too far away from the battlefield to send a useful number of troops. An anonymous writer noted in an 1862 article in the New York Times, “[Californians’] loyalty has always been above reproach. They have done us the honor to sympathize with us in our troubles. California leads all her sisters of the Union, and wins as much glory as she could by fighting.”

But the shipments from San Francisco did not go unnoticed by Confederate sympathizers, who hatched several unsuccessful plots to intercept the gold coming out of California.

A schooner called J.M. Chapman was seized by the San Francisco police and U.S. government officials as a possible privateer ship in March 1863. Contemporary reports speculated the privateers may have wanted to take over the Oregon, a steamer ship, and use that vessel to confront Union treasure ships.

The gold from California dodged the privateers and enriched the Union, but Sutter was not so lucky. While the land where Sutter’s saw mill stood is registered as a state historic landmark, and the first flake of gold Marshall found is now stored at the Smithsonian Institution in Washington, D.C., Sutter himself died in 1880, penniless.