“There will never be amnesty under President Trump. The president is very clear that he doesn’t believe that the law should apply to some people and not to others, and that there should be consequences for some people and not for others.” – Homeland Security Secretary Kristi Noem, when asked about leniency for undocumented farm workers.

In the rowdy HBO series “Deadwood,” the imminent annexation of the Black Hills to Dakota Territory is depicted in a conversation between the profane brothel owner Al Swearengen and a corrupt politician from the territorial capital in Yankton.

The aptly named Swearengen (based on a real character) knew that he and the speculators, gold-panners, outlaws and miners pouring into the Black Hills were violating the 1868 Fort Laramie Treaty that gave the Sioux “absolute and undisturbed use” of its pine-cloaked, granite-spired mountains and lush valleys. Once George Armstrong Custer and his 7th Cavalry discovered gold in the Black Hills in 1874, the rush was on. But after the June 1876 annihilation of Custer and his cavalry at the Little Bighorn more than 200 miles northwest of Deadwood, the Sioux were on the run from the U.S. military or being pushed onto smaller reservations. The government abandoned the 1868 treaty and seized the Black Hills.

The Yankton politician had come to Deadwood with an amnesty loophole for Swearengen and his fellow treaty breakers. Citing the Northwest Ordinance, a 1787 law setting legal guidelines for forming new states out of unceded territory, the politician hypothesized that “a citizen can have title to any land unclaimed or unincorporated by simple usage. Essentially, if you're on it and you improve it, you own it."

Swearingen knew the game: “So who needs to get paid?” The politician grabbed a pencil and started writing a list of other crooked politicians.

In the century and a half since, what became in 1889 South Dakota ‒ where Noem was twice elected governor ‒ has benefited bountifully from what began as illegal migration.

How South Dakota has reaped benefits from illegal migration

In 1980, the U.S. Supreme Court ruled that the Sioux were entitled to $105 million (now more than $1 billion with interest) in payment for the illegal taking of the Black Hills. For 45 years, the Sioux have refused to accept the payoff, declaring that the Black Hills were not for sale.

A lower court had declared that “a more ripe and rank case of dishonorable dealings will never, in all probability, be found in our history.”

Recent revelations added to that ripe-and-rank history. Documents uncovered last decade suggested that then-President Ulysses S. Grant secretly stopped enforcing the boundaries delineating Sioux land to boost a depressed economy after Custer’s geologists discovered the gold. What better way to spark the economy out of the “Long Depression” than a gold rush?

Since that gold rush, South Dakotans have reaped vast amounts of wealth from tourists visiting the Hills, and from the treasure of minerals extracted from its streams and mountains. Homestake Gold Mine, a short horse ride from Deadwood, produced more than 40 million ounces of gold before it closed in 2002. Tourists spend $5 billion annually in South Dakota, and the beauty and mystery of the Black Hills is central to the state’s tourism promotion.

This tale of broken treaties, illegal migrants and the genocidal military campaigns against the Sioux is the kind of history that President Donald Trump complains gets too much attention by people with “woke” agendas. But this Black Hills story is about more than what ends up in history textbooks.

Imagine if Ulysses S. Grant sent masked federal agents to detain illegal gold miners

The Trump administration’s hard line on immigration essentially ignores history, cutting off any solution short of the harsh-right militarization of U.S. immigration policy in the months since Trump began sending swarms of masked agents to detain and deport modern border violators.

Imagine if, in 1876, Grant had decided to send in masked men to extract the thousands of fortune-seekers illegally panning in the Black Hills.

Of all of Trump’s Cabinet members, Noem should understand how hypocritical this will look to historians. The ex-governor of a state whose 19th century foundation was built, in part, by illegal border crossings is now the face of a hard-line policy that denies leniency for immigrants seeking the same freedom of opportunity that drove thousands to ignore borders in her own home state a century and a half ago.

Deadwood is central to the uniquely American Wild West mythology of righteous lawlessness. As governor, Noem often trumpeted South Dakota as a place where freedom and opportunity reigned more than any other.

Deadwood’s foundational history, however, that romanticized the mythology of six-shooter justice and taking the law into one’s hands was built around migrants illegally squatting on Indian land.

If Noem can so callously brush aside the actual history from where she came ‒ if she can declare no prospects for amnesty ‒ then this new history of the United States that she and Trump are trying to write can’t be dressed up by all the romanticizing in the world.

In 2016, the Smithsonian Magazine published an article by Peter Cozzens (whose new book, “Deadwood – Gold, Guns, and Greed in the American West,” is just out) about uncovered documents from the Grant administration. The documents described a deliberate policy to force the Sioux into a war to legitimize the seizure of the Black Hills.

Meanwhile the U.S. military was to look the other way as the gold rush commenced.

A confidential order from Army Lt. Gen. Philip Sheridan to Alfred Terry, the military commander of Dakota Territory, was especially telling.

According to Sheridan, Grant in a meeting on Nov. 3, 1875, “decided that while the orders heretofore issued forbidding the occupation of the Black Hills country by miners should not be rescinded, still no fixed resistance by the military should be made to the miners going in.”

Seven months before Custer and his 7th Cavalry were wiped out, the U.S. government had given a green light for illegal migration into the Black Hills.

South Dakota native Chuck Raasch is a journalist and author of “Life Painted Red: The True Story of Corabelle Fellows and How Her Life on the Dakota Frontier Became a National Scandal,” and “Imperfect Union: A Father’s Search for his Son in the Aftermath of the Battle of Gettysburg.” He was a longtime national correspondent and columnist for USA TODAY and Gannett.

This article originally appeared on USA TODAY: Illegal migrants built South Dakota. Has DHS chief Kristi Noem forgotten? | Opinion

Reporting by Chuck Raasch / USA TODAY

USA TODAY Network via Reuters Connect