“We will no longer bank the private prison industry,” spokesman Andrew Gray said in a statement.

The announcement follows similar moves by Wells Fargo and U.S. Bank, which told The Washington Post they are in the process of divesting from the private detention sector.

Activists, who waged a two-year campaign against JPMorgan’s investments, hope that mounting public pressure will prod other financial giants, such as Bank of America, to follow suit. But they acknowledge that it’s much harder to persuade tech firms such as Amazon, Palantir and Microsoft to withdraw from lucrative federal contracts with agencies charged with mass surveillance and deportation.

AD

AD

“It will all boil down at the end of the day to whether or not the profit or potential profit is worth the risk, including public exposure,” said Charles Geisst, an economics and finance professor at Manhattan College.

JPMorgan, amid an aggressive expansion of its retail footprint, concluded that it was not. The bank’s decision to divest from private prison operators Core­Civic and GEO Group, first reported by Reuters, came after a dogged effort by immigrant rights groups.

Protesters picketed chief executive Jamie Dimon’s Manhattan apartment with a mariachi band, and at another demonstration, a sound system blasted recorded cries of separated immigrant children begging for their parents.

AD

They disrupted shareholder meetings and delivered petitions imploring the bank to “break up with private prison companies.”

AD

JPMorgan ultimately determined that the financial and reputational risks weren’t worth the investment.

“They want to build a customer base by opening more branches,” said Stephen Lerner, a community organizer and fellow at Georgetown University’s Kalmanovitz Initiative for Labor and the Working Poor. “Investing in private prisons doesn’t help them in immigrant communities. The mood of the country is that the vast majority of people don’t support having families interned or having children separated from their families.”

Trump’s immigration policies are largely unpopular with the general public but well-received among his fellow Republicans, according to national polls. In a Quinnipiac University poll last week, 58 percent of voters disapproved of Trump’s handling of immigration issues, while 40 percent approved.

AD

AD

A Washington Post-Schar School poll last summer found that 69 percent of Americans opposed separating undocumented immigrant children from their parents, while 29 percent supported the policy. Among Republicans, 61 percent supported the family separation policy.

Other banks are backing away from financing private prisons, where the number of immigrant detainees is increasing under the Trump administration.

Wells Fargo, in a lengthy business standards report released in January, said it is no longer “actively marketing” to that sector.

“Our credit exposure to private prison companies has significantly decreased and is expected to continue to decline,” the report said.

AD

Wells Fargo spokeswoman Jessica Ong told The Post that it made the “risk-based business decision” roughly two years ago to “exit banking relationships with private prison companies” when their contracts expire.

AD

“Since then, we have steadily reduced our exposure and have no plans to add additional relationships from the private prison industry,” Ong said.

U.S. Bank, too, has pulled back, a company spokesman told The Post. The move has not previously been reported.

“Our credit exposure to private prison companies has decreased to an immaterial amount in recent years and we continue to reduce our exposure given the risk characteristics of this industry,” said Dana Ripley, U.S. Bank spokesman.

The pressure on financial firms is also building among newly elected Democrats in Congress.

AD

Rep. Alexandria Ocasio-Cortez (D-N.Y.), a freshman on the House Financial Services Committee, has called for hearings to “make these banks accountable for investing in and making money off of the detention of immigrants.”

CoreCivic and GEO Group said that their companies were unfairly targeted for political reasons and that neither manage detention centers housing children separated from their parents.

AD

Pablo Paez, GEO Group spokesman, said activists have deliberately mischaracterized its long-standing work with the government.

Amanda Gilchrist, CoreCivic spokeswoman, said the company has played a “limited role in America’s immigration system” during every administration — Democratic and Republican — for more than 35 years.

AD

Public employee pension funds in New York City, Philadelphia, New York state and California have also divested from private prisons over the past two years.

White House spokesman Hogan Gidley called the protests against businesses that work with Immigration and Customs Enforcement “sad” because the agency “protects American communities every day by arresting murderers, dangerous gang members, rapists and drug dealers.”

Mark Krikorian, executive director of the Center for Immigration Studies, a Washington think tank that supports tighter controls on immigration, characterized growing liberal attempts to shame companies for doing business with the federal government as a “pernicious strategy to politicize business activity.”

AD

AD

“These activists can’t achieve what they want through normal political means — by winning elections,” Krikorian said. “So they resort to an authoritarian tactic to force companies to adhere to their political agenda.”

Activist investors say that ­JPMorgan’s divestment decision demonstrates the financial and reputational risks of conducting business in the immigration arena during the Trump presidency. They plan to continue pushing their views through shareholder resolutions during annual meetings this spring.

“Because Trump is so extreme, it makes it much harder for these companies to say well, this is just part of our business,” Lerner said. “They are automatically tainted by everything Donald Trump does.”

AD

Tech companies under fire for their government contracts have more difficulty setting clear parameters regarding what kind of business they will — or will not — pursue, some investors said.

“Financial firms can pull out of two prison companies, and they will still have plenty of business opportunities to pursue. But the way tech has infiltrated society makes it harder for Amazon and Microsoft to draw distinct lines around their business,” said Mary Beth Gallagher, executive director of the Tri-State Coalition for Responsible Investment, a New Jersey-based group of Catholic institutional investors with shares in Amazon, JPMorgan, Microsoft and other companies with ties to federal agencies that enforce immigration laws.

AD

Gallagher’s group has filed a resolution asking Amazon to suspend the sale of its facial recognition technology, called Rekognition, to government agencies until it assesses the potential human rights risks. Amazon is challenging the resolution through the U.S. Securities and Exchange Commission, and the company declined to comment.

(Amazon chief executive Jeffrey P. Bezos owns The Post.)

“Rekognition is the kind of technology that has potentially huge ramifications for society, and the company has to be mindful who they are selling their tools to and how they might be used,” Gallagher said.

During a New York City Council meeting in December about Amazon’s once-planned second headquarters in Queens, executives drew boos and pointed questioning for the company’s marketing of its facial recognition system to federal immigration officials.

AD

Amazon, Palantir and Microsoft have also faced criticism from employees over their work with ICE.

In a letter last year, Amazon workers beseeched Bezos to stop selling the facial recognition software to law enforcement and to no longer host Palantir, a data mining company working with ICE, on its servers because doing so implicates Amazon in “providing infrastructure and services that enable ICE and [the Department of Homeland Security.]”

Activists say that Palantir, co-founded by Trump supporter ­Peter Thiel, helps ICE agents profile undocumented immigrants by scouring various databases and social media and targeting them for deportation. A Palantir spokeswoman declined to comment.

During the heat of last summer’s outcry over Trump’s family separation policy, more than 100 Microsoft workers wrote to chief executive Satya Nadella opposing the company’s contract with ICE. Nadella in his response said that Microsoft’s contract supports email, calendar, messaging and document management — and that the company was not working on projects related to separating children from their families at the border.

Any connection to Trump’s immigration policies is also complicating recruitment.

At a January career fair at Stanford University, a fertile tech recruiting ground, students circulated fliers urging classmates to “SAY NO to designing tools that increase deportations, imprisonment & family separation.”

Opposition to Amazon’s and Palantir’s ties to ICE even popped up in the form of a giant cage on wheels at Burning Man, the once-bohemian desert festival that now draws much of the tech elite.

“These big tech corporations can’t simultaneously claim they are a force for good and innovation when increasingly they are part of the mass surveillance of immigrants and suppression of civil liberties,” Lerner said.

He cited Dow Chemical, maker of napalm during the Vietnam War, as a cautionary tale. It took the chemical company decades to recover its reputation even though it made napalm for the military for only four years — a fact recently highlighted by New York Times business columnist Kevin Roose.

“All told, the $5 million napalm contract most likely cost Dow Chemical billions of dollars,” Roose wrote. “And it was the kind of unforced error that could have been avoided if company executives had listened to early signs of opposition, done some risk analysis and changed course.”