In the 1960s, economics student Dilma Rousseff joined her first militant group opposing the military dictatorship in Brazil. In 1970, she was captured, tortured and tossed in prison for nearly three years.
Jose Serra also was active in student politics, leading the left-leaning National Student Union and attracting the interest of the military. Just before the 1964 military coup, he fled the country.
Now, these former militants — who entered mainstream politics decades ago — are the front-runners in Brazil's presidential election on Sunday. Expected to finish a distant third in a nine-candidate field is Green Party candidate Marina Silva.
While the leading candidates' political histories might give U.S. voters pause, it's mostly a nonissue for Brazilians.
"That's the past. I don't criticize. . . . Those who are to be criticized are the military leaders who took power without a mandate," said Paulo Sotero, director of the Brazil Institute at the Woodrow Wilson Center in Washington.
Rousseff, 62, and Serra, 68, the former governor of Sao Paulo, also share other similarities: Both come from first-generation immigrant families, studied economics, are skilled administrators, and have spent long years in public service.
There is one big difference, however: Rousseff is the handpicked candidate of President Luiz Inacio Lula da Silva, who is riding a vast wave of popularity in this ascendant country of 201 million.
Lula, who can't seek reelection after serving two consecutive terms but could run again in four years, has presided over an era of economic growth when 24 million Brazilians moved out of poverty and the middle class grew to 103 million.
Despite twinges of new scandal in his administration, so long are Lula's coattails that some analysts expect Rousseff, the president's former chief of staff, to win the election outright without having to go to a second round on Oct. 31.
Brazil's new president will take over on Jan. 1.
A victory by Rousseff would make her the first woman president in Latin America's largest country, and a major U.S. trading partner.
A Datafolha poll released Thursday showed Rousseff's lead had slipped a few points from its peak to 52 percent — but that would still give her the percentage of valid votes she needs to escape a second round, which analysts say she would win handily.
Allegations that Lula's chief of staff, Erenice Guerra, also a former aide to Rousseff, was involved in a kickback scheme prompted Guerra to resign and may be having an impact on Rousseff's lead.
Rousseff, who represents the coalition Para o Brasil seguir mudando (So that Brazil Keeps on Changing) headed by Lula's Workers Party, has positioned herself as the candidate best able to continue his market-friendly policies.
In fact, many analysts say what Brazilians want is more of the same — brisk economic growth along with more equitable income distribution. Brazil also has discovered huge deepwater oil reserves and will host the 2014 World Cup and 2016 Olympic Games, events that are starting to spur an array of public works projects.
"Brazil is on a roll for the next four or five years and it's very difficult to see anything that would derail that prospect," said Paulo Vieira da Cunha, a partner in New York-based Tandem Global Partners and the former deputy governor of the Central Bank of Brazil.
During the campaign, Serra, from the coalition O Brasil pode mais (Brazil Can Do More) that's headed by his Brazilian Social Democracy Party also has tried to portray himself as the heir to Lula's policies without much success.
"There is a clear feeling among the population that (Rousseff) is prepared to continue Lula's work," said Jeanine Pires, former head of Embratur — the government tourism promotion agency — and now director of Brasil 2016. "She knows the country's problems well and what it takes to solve them. She's very intelligent, a strong woman and very prepared as an executive."
Still, when Rousseff began her campaign in March, hers was scarcely a household name.
Though she's been involved in politics for most of her life and served in high-level administrative posts (chief of staff, minister of mines and president of the board of state-owned oil company Petrobras), much of her work has been behind the scenes.
Unlike Serra, she's never held elective office.
Her political past, however, has provided an intriguing back story to the campaign. In fact, Lula da Silva has said, "What I most admire in Dilma is the story of her life."
Born to a Bulgarian immigrant father and a Brazilian teacher in the state of Minas Gerais, Rousseff had a comfortable childhood, went to private school, belonged to the Minas Tennis Club and mingled with the elite of Belo Horizonte.
Her teenage years were a time of political foment in Brazil and she joined her first clandestine group as a 16-year-old.
As the government took a turn to the left, the military seized power in 1964 and thus began an era when students were forbidden to organize and removed from universities because of their political activities; the press, literature and the arts were censured; the constitution was suspended and opponents were stripped of their civil rights, jailed and tortured.
As a member of the Revolutionary Armed Vanguard Palmares, Rousseff and her former husband, fellow militant Claudio Galena, moved frequently from house to house as a police crackdown intensified, according to the biography on her campaign website.
Bank robberies and thefts to bankroll arms purchases were standard operating procedure for many of the guerrilla groups of the time, including VAR-Palmares.
How central a role Rousseff played in the armed resistance is a topic of debate. Her campaign website says that "since she never participated in any armed act, military justice sentenced her as a subversive." In complaints she filed after her release, she said she was beaten, punched and subjected to electric shocks while imprisoned.
After her 1973 release, she moved to Porto Alegre where she resumed her studies and eventually began working in state government.
The military dictatorship came to an end in 1979, and both Rousseff and Serra — who stayed abroad for 14 years — took advantage of a 1979 amnesty law to return to political life.
Rousseff, a cancer survivor, is described as tough, smart and hyper-focused by those who know her. "She's also famous for being short-fused, no-nonsense and very direct," Sotero said.
During the campaign, both Serra and Rousseff have been criticized as stiff public speakers, though Rousseff seems to be learning on the campaign trail.
At a rally on her home turf of Puerto Alegre last weekend with Lula at her side, she not only sang along with the crowd but gave an impassioned speech and donned a purple hard hat presented by women in a construction training program.
Only Rousseff, the president told the crowd, will be able to unite the entire country from the poor to students to the middle class and business.
(Whitefield reports for the Miami Herald.)
MORE FROM MCCLATCHY