The University of California is taking its money out of prisons.

Student activists won a victory by convincing the University of California to dump nearly $30 million in stock in for-profit prison companies.

The Afrikan Black Coalition argued that the prisons and the university were profiting from the over-criminalization of minorities.

"UC has blood on their hands," the group said in November. "Private prison corporations exist to build centers of white supremacist dehumanization, turning Black, brown, and immigrant bodies into a profit under the guise of rehabilitation."

The group hailed the decision as "historic and momentous."

The sale of the stock in Corrections Corporation of America (CXW) and The Geo Group (GEO) was confirmed by the office of UC President Janet Napolitano, who was formerly secretary of Homeland Security and governor of Arizona.

The university said its chief investment officer met with the students, but it insisted it made the move based on the risk posed by the shares and not pressure from the students.

UC spokesman Steve Montiel said the prison holdings made up about $30 million of the university's $100 billion investment portfolio.

"Many factors figure into this perspective, such as whether social, governance, or environmental issues make the asset too risky over the long term," Montiel said.

Shares of both the Geo Group (down 29%) and CCA (down 24%) have performed badly this year.

In response to the UC divestiture, the companies defended their industry. They said they don't lobby for the criminal justice policies that determine how long prisoners are incarcerated and provide academic and vocational classes to prisoners.

"By appearing to bow to activist demands the [divestiture] decision represents a missed opportunity for honest and thoughtful dialogue around corrections systems, the role of our industry and the distinction between rhetoric and reality," said CCA spokesman Steve Owen.

The students also pushed the University of California to divest its shares of Wells Fargo (WFC), which in 2012 agreed to pay $175 million to settle claims it discriminated against minority borrowers.

UC's Montiel said there are no plans for the university to sell shares of Wells Fargo.

In June, Columbia University became the first U.S. college to divest from prison stocks after protests by students.