California Attorney General Kamala Harris, a veteran prosecutor with acute political instincts and a reputation for thick skin, gambled big in the settlement negotiations with banks over illegal foreclosures.

It's a gamble that appears to have paid off spectacularly.

Harris, whose state has been one of the hardest hit by the U.S. foreclosure crisis, pulled out of talks with the banks last September, saying what they were offering was grossly insufficient.

At the time, her office said on Thursday, California was being offered between $2 billion and $4 billion.

The gambit carried significant risks. California is a non-judicial foreclosure state, meaning foreclosures can happen outside the court system. Thus there are no court files filled with the notorious robo-signed documents, leaving Harris with less leverage than other states in negotiating with the banks.

Yet on Thursday, Harris held a press conference in Los Angeles to herald a deal that looks exceptionally favorable to California. Out of the $40 billion in total benefits that are expected to flow from the $25 billion settlement that the banks agreed to pay, California is set to emerge with some $18 billion.

Harris wrung a commitment from the banks to reduce loans to distressed homeowners by $9 billion, and to provide $3 billion to assist short sales. Another $6 billion will fund restitution and anti-blight programs, among other things. There are also enforcement and penalty provisions unique to California that Harris said will make sure the banks comply with the terms of the settlement.

Harris' hardball tactics reflect a woman who has prospered in the rough and tumble politics of the Golden State.

Born in Oakland, California, she is the daughter of a Tamil mother, a breast cancer specialist who emigrated to the United States in 1960, and a Jamaican American father, a Stanford University economic professor.

Her parents divorced when she was a toddler and her mother raised Harris and her sister to be proud African Americans during the tumult of the Civil Rights era.

By virtue of her gender and her parentage, Harris is the first female, the first African American and the first Asian American attorney general in California, and the first Tamil American attorney general in the United States.

A career prosecutor, she was elected district attorney of San Francisco in 2003 after defeating two-term incumbent Terence Hall. She was re-elected unopposed in 2007.

Convictions in San Francisco increased sharply during her tenure. But her unshakeable opposition to the death penalty led to a bitter stand-off with the city's police department when, just four months into the job, a police officer was gunned down and killed by a gang member and Harris declined to seek the death penalty.

She also came under fire when a scandal engulfed the San Francisco crime lab, resulting in the mass dismissal of drug cases.

Yet she remained a highly appealing political figure, dubbed the female Barack Obama by some wags. In 2010, she prevailed over a weak field to win the Democratic nomination for attorney general, and then barely edged her Republican rival, Los Angeles district attorney Steve Cooley, in the general election.

Harris is widely considered to be a likely future candidate for higher office; if the mortgage settlement proceeds as planned, it could ultimately help more than just the troubled homeowners.