While Jorge Mario Bergoglio served a higher authority as a Catholic shepherd in this cosmopolitan capital, he was also tested by more earthly powers: Argentine governments.

With the historic rise of an Argentine to the throne of St. Peter, this nation has erupted in celebration and debate, with one of its own becoming the first Latin American pope. The story of his relationship with his home government, some here say, underscores his willingness to butt heads with secular leaders whose politics conflict with the Roman Catholic Church.

In recent years, his clashes with the husband-and-wife tag team who have led this nation of 40 million created a rift between the Casa Rosada — Argentina’s White House — and the church as Bergoglio challenged the moral authority of elected leaders. Now, as he enters the crisis-plagued halls of Vatican City, his years in Argentina show that when he sees fit, Pope Francis can be a combative leader unafraid to challenge entrenched authority.

What is less clear, however, is his record during Argentina’s 1976-83 “Dirty War,” when a right-wing junta unleashed a reign of fear on this country that reached into the ranks of Bergoglio’s clerics. Some here have suggested that Bergoglio may have stood aside as the military government hunted down those it viewed as subversives, with published accounts suggesting he allowed the arrest of two left-leaning priests who were drugged and taken by helicopter to the junta’s most notorious prison in 1976.

This is the side of the new pope “that he doesn’t talk about,” said Horacio Verbitsky, an Argentine journalist and author of “The Silence,” a book chronicling complacency — and worse — during the Dirty War.

National Catholic Reporter’s Michael Sean Winters discusses the selection of Argentina’s Cardinal Jorge Mario Bergoglio for pope. Bergoglio has chosen Francis as his name, which reflects his simple lifestyle. (Jayne Orenstein/The Washington Post)

Yet Pope Francis, who has strongly denied those allegations, also has defenders who say that he not only resisted the military but also actively helped those seeking sanctuary.

“There were bishops who were complicit in the dictatorship,” Adolfo Pérez Esquivel, the Nobel Peace Prize-winning Argentine human rights activist, told the BBC’s Spanish-language service on Thursday. “But not Bergoglio.”

Taking on the Kirchners

Whatever his role in that chapter of Argentine history, his political role in a country polarized between President Cristina Fernández de Kirchner’s government and a beleaguered opposition became a central theme here a day after Bergoglio was named pope. Bergoglio, observers say, has not been shy about energetically taking on the president or her predecessor and late husband, Néstor Kirchner.

“It was never a good relation,” said Oscar Aguad, a deputy in Argentina’s congress from the opposition Radical party. “There were scraps between Bergoglio and the Kirchner governments, to the point where Nestor Kirchner even said that Bergoglio was the head of the opposition.”

Tensions between Bergoglio and the Kirchners increased during the 2000s as the couple began to guide Argentina out of an economic collapse. The Kirchners rode a wave of popularity, which critics say they used to intervene in the economy and adopt a take-no-prisoners approach to the opposition and the press. Eventually, they tussled with the Roman Catholic Church.

Observers in Argentina said Bergoglio did not act in opposition to the Kirchners’ stated goal of reducing poverty; in fact, Bergoglio emerged during the peak of the Argentine economic crisis of 2000 as a fierce critic of globalization. Rather, he was simply not shy about exposing what some critics of the government call its mendacity in reporting economic data. The church waded into this thicket not with a direct attack but by issuing its own poverty figures showing that the number of poor people was much higher than the Kirchners asserted.

“When Bergoglio talked of extreme poverty, or of the kids who are among the army of drug addicts, the government felt it was under attack because they’re in charge of anti-narcotics efforts, social programs and health care,” said Oscar Raúl Aguad, a lawmaker who opposed the Kirchners’ programs.

With the election of Cardinal Jorge Mario Bergoglio of Argentina as the 266th pope, the cardinals of the Roman Catholic Church have broken Europe's long stranglehold on the papacy.

Bergoglio also took to using his high-profile sermons on May 25, Argentina’s Revolution Day, to deliver critiques of the Peronist leaders, some of which were carefully worded but nonetheless angered the nation’s most influential power couple.

“Power is born of confidence, not with manipulation, intimidation or with arrogance,” Bergoglio said in 2006.

Carlos Fara, a political analyst and pollster, said part of the tension stemmed from the fact that Bergoglio hailed from a more moderate form of Peronism — the uniquely Argentine brand of nationalist politics founded by Juan Peron — than the Kirchners, who leaned toward the left of the party’s spectrum. That also included an increasingly secular agenda.

After Bergoglio’s selection as pope, Kirchner issued a statement saying she hoped his move to Rome as Pope Francis — a name she said she thought came from St. Francis of Assisi, who gave up earthly wealth — would bring the “option of the poor” closer to the “hierarchy” of the church.

Tension over social issues

But perhaps not surprisingly, the most-bitter tussles between Bergoglio and the government revolved around social issues. In 2010, Argentina became the first country in Latin America to approve a marriage law that gave same-sex couples the same rights as heterosexual ones. The church opposed the government head-on, and tensions flared.

Bergoglio, considered the most prominent opponent of the government’s effort to approve the law, also was criticized for warning that the law amounted to an “intention to destroy God’s plan.”

“Today the media are building this image of him as the humble pope,” said Andrea D’Atri, founder of Bread and Roses, a human rights group, who is critical of Bertoglio’s opposition to gay rights. “In Argentina, his naming as pope has been received with the warmest enthusiasm by the rightist opposition.”

The church, too, was not averse to the bare-knuckles politics of the kind that’s common in Argentina. When a regional Peronist governor and Kirchner ally was seeking to alter locals laws to extend his term in office in 2007, Cardinal Bergoglio, according to leaked U.S. cables, added his voice to the opposition. He backed a coalition that included Catholic Church leaders, seeking to block what appeared to be a Peronist grab for power in the northern province of Misiones.

On Thursday in Argentina, Bergoglio was also being remembered for his work with the poor, central to the Jesuits’ work in Latin America.

The Argentine press recounted how he washed the feet of a dozen AIDS patients in 2001, and how he sharply criticized priests who had refused to baptize the newborns of unmarried mothers. Photographs of Bergoglio riding the subway were also published in Thursday’s newspapers.

Those who knew Bergoglio remember a kind and sometimes precocious boy. Amalia Damonte, 77, said her home was barely 100 feet from where Jose Maria Bergoglio, the new pope’s father, was raising four children. She remembers playing with Jorge Mario and how he at one point declared his love for her.

“He left me a letter with a photograph at my house that said this house you see here will be ours when we get married,” she rcalled. Her parents, who found the letter, weren’t pleased and she told Jorge Mario.

He retorted: “If you can’t marry me then I’ll become a priest,” she said.

At the Our Lady of Mercy, a school where the new pope had his first communion, Rosa Blanco, 90, still remembers Bergoglio and the neighborhood in which he grew up, Flores.

He was “calm, fun, like all boys,” and had been a good friend of her brother.

Another woman who knew him, Elsa Scigliano, 70, said she recalled when the future pope caused a minor uproar. “He played in the street,” she said. “One time, playing football, he broke a window of a neighbor’s house. He went to say he was sorry. He always apologized.”

At Our Lady of Mercy, a Sister Teresa del Carmen Rovira, who oversees preschool education, like others there on Thursday spoke of the important dates of Bergoglio’s early life. She noted that he took First Communion on Oct. 8, 1944. And she said that the teachers and administrators there were always excited when he returned.

“He always came, asked what we wanted, made us feel better, so we would take the happiness of God to the people,” said Sister Teresa.

She recalled how before he traveled to Rome recently, he had said that he would go and return in time to celebrate Holy Week.

“Well,” Sister Teresa said, “I guess now he’ll do it in Rome.”

But if Bergoglio’s critics contend that if he was quick to rally against progressive social moments and populist leftist leaders, he was less inclined to rebuke the right-wing junta that fell after the 1983 war with Britain over the Falkland Islands.

People quoted in Verbitsky’s book assert that during the Dirty War, Bergoglio, then a Jesuit leader, pressured two clerics in his order to cease their leftist teachings in a Buenos Aires slum. The book says that a decision to lift the order’s protection of the two men — Orlando Yorio and Franz Jalics — allowed the military to detain them at the Navy Mechanics School prison, the Army’s most notorious, for five months of deprivation.

“I have no reason to believe he did anything to free us, in fact just the opposite,” Verbitzky quoted Yorio as saying of Bergoglio.

Yorio died in Uruguay in 2000. Jalics, now 85 and living in seclusion with a religious order in Germany, was on retreat Thursday and could not be reached for comment.

But supporters of Bergoglio contend that the new pope did his best during a dangerous time in Argentina and risked his own life to aid those in danger.

“He disagreed with two Jesuits that had been taken because they wanted to take the way of violence and arms,” said Mario Aguilar, a Chilean theologian at Britain’s University of St. Andrews. “ He said that we are not going to be guerrillas or revolutionaries, because we are priests. He could not have done otherwise. The idea that he was complacent is a misunderstanding he was under immense pressure under the military junta and the church.”

Faiola reported from Rome. Juan Forero in Charleston, W.Va., Michael Birnbaum in Berlin and Eliza Mackintosh in London contributed to this report.