SANTIAGO, Chile – Their history is the history of Chile. Michelle Bachelet and Evelyn Matthei were childhood friends whose fathers became top generals on opposite sides of the country's deep political divide.

Bachelet's father supported socialist President Salvador Allende until the 1973 coup ended one of Latin America's oldest democracies. Matthei's father ran the military school where Gen. Alberto Bachelet was tortured to death for refusing to line up behind dictator Augusto Pinochet.

Their daughters somehow remained cordial over the years as they rose through the ranks of their political parties on the left and the right. But now they're campaigning against each other to run the country in presidential elections on Nov. 17.

"There's an inevitable return to the past," said Esteban Valenzuela, a political analyst at Universidad Alberto Hurtado in Santiago. "It's an historic dispute between the daughters of a victim of the dictatorship and an active member of the military junta."

Only months ago, neither seemed to want this.

Bachelet, who served as Chile's first female president from 2006 to 2010, was happily running the U.N.'s agency for women in New York until she finally resigned in March, when it had become obvious that the center-left coalition couldn't settle on anyone else popular enough to win back the presidency.

Matthei was running President Sebastian Pinera's labor and social security ministry and, at 59, had her sights on retirement. That changed earlier this month, when the center-right alliance threatened to unravel after its presidential candidate shocked the country by quitting, citing depression, only weeks after winning the primary. Pinera backed Matthei as the right's best remaining hope for stopping Bachelet's return.

Polls have suggested that Bachelet, a 61-year-old former pediatrician and socialist with a maternal touch, is unstoppable. Support for Matthei has yet to be measured.

An economist, Matthei is proud of having taken tough stands as she rose through the Independent Democratic Union, the hard-right party that sustained Pinochet's 17-year dictatorship and sought to protect his legacy for years thereafter. She describes herself as "chucara," Chilean slang for a horse that can't be tamed.

"I'm not the daughter of a military man, I'm Evelyn Matthei," she declared as she launched her campaign. "No one sees me as the daughter of the retired general Fernando Matthei. I've never been treated or behaved like 'the daughter of.'"

Both women inherited their fathers' sense of duty and commitment, ignoring gender barriers as they rose through Chile's male-dominated politics. The election is Chile's first presidential race featuring women representing the major coalitions.

"I've always said that if women can give birth they can tolerate anything. So we're going to be governing with strength," Bachelet said during her first year as president.

Matthei, for her part, said being female should help her election campaign. "I don't think men really realize how they discriminate against women in their daily lives," she told CNN Chile recently. "These are ingrained cultural issues, backward-looking and not often spoken."

Bachelet and Matthei were close in the 1960s: Their fathers, both fighter pilots, were attached to the same military base and the girls were playmates at the same elementary school.

By 1972, as other high-ranking military officers were conspiring to end his socialist presidency, Allende put Gen. Bachelet in charge of overseeing food sales nationwide. Many products were in short supply as Allende's right-wing opponents, financed by the Nixon administration, held back goods and instigated strikes to create a sense of chaos.

Then came Sept. 11, 1973. Bachelet, a medical student, climbed to the roof of her university to watch fighter jets bomb the presidential palace. Her father was soon arrested. He had remained loyal to Allende, even after the democratically elected president committed suicide rather than surrender.

Gen. Matthei, stationed in Britain, returned home shortly after the coup, becoming Pinochet's health minister and then a member of the junta.

Gen. Bachelet, meanwhile, died in prison after being tortured by officers at the military school run by Matthei.

Pinochet's takeover forced every Chilean to take sides, and the generals' daughters were no exception, devoting their lives to public service from opposite sides of the political spectrum.

At first, Matthei remained in London and helped the military government's embassy with translations while studying to become a concert pianist. Bachelet joined the resistance, and helped hide dissidents until she too was arrested, in 1975.

Bachelet was interrogated, tortured, jailed and then exiled — an ordeal she prefers not to discuss. The former president's autobiography says she suffered "physical hardships" before using political connections to reach Australia and East Germany.

When Pinochet finally lost a referendum on whether or not to remain in power — the subject of this year's Oscar-nominated film, "No," he tried to persuade his generals to overturn the results, and it fell to Gen. Matthei to stand up to the dictator, telling him they wouldn't go along.

Since the country's return to democracy in 1990, both women have sought to avoid using their shared past against each other.

But the truce was threatened recently when Matthei's father was called into court to answer accusations of responsibility for Gen. Bachelet's torture, which happened shortly after the military school came under his command, but before he had physically moved in.

His daughter called the accusations "disgusting" and suggested that Bachelet's forces were somehow behind the judicial maneuver. Bachelet responded that her family had nothing to do with it.

Gen. Matthei, now 88, has had a very low profile since the return of the democracy, and hasn't spoken publicly about the torture allegations or his daughter's candidacy.

But Gen. Bachelet's widow, Angela Jeria, said last year that "Gen. Matthei has always been our friend ... I care for him a lot and I'm certain that he wasn't at the Air War Academy when my husband was there."

Both candidates say they're strongly committed to defending human rights, and want to run on current issues in response to mass protests that have called for profound changes in society.

Bachelet vows to use a second term to fight Chile's income inequality. Matthei angered elements of her own party by advocating for abortions when a mother's health is in danger; Bachelet would legalize it in cases of rape as well.

Both would reform taxes and change the Pinochet-era's constitution to break the lock on elective offices long enjoyed by their two dominant coalitions. And both want education reform, although Bachelet agrees with the protesters' demands for universal free education, and Matthei says she is "totally opposed."

"'Today's triumph is not the victory of one person, but of millions of Chileans," Bachelet said after winning the center-left's primary. "It's a project where the voices of citizens are vital. It's the triumph of the demand for education that is free, dignified and of quality for every child."

Bachelet's spokesman Alvaro Elizalde repeated his boss's call for a clean campaign, but both sides are already in attack mode.

"While Michelle Bachelet was running around Fifth Avenue in New York, Evelyn Matthei was running around the regions and communities of this country, seeking the citizens' support, with the conviction that she has all the elements necessary to win," UDI president Patricio Melero said.

Bachelet's allies lashed back: Matthei's "Achilles' heel" is her past as the daughter of a junta member, now competing against one of its leading victims, countered Domingo Namuncura, a political analyst whose PPD party is part of the center-left coalition.