About three weeks before the U.S. Supreme Court legalized same-sex marriage, the Colombian government issued a directive that received little international notice. On June 4th, the government announced that it would allow Colombian citizens to change their gender on identity documents without first undergoing gender-reassignment surgery or obtaining permission from a medical professional. These requirements, which remain in place, either in whole or in part, in the U.S. and most of the rest of the world, were “profoundly invasive of the right to privacy and based upon an impermissible bias,” said Yesid Reyes, the minister of justice. “The construction of sexual identity and gender is a matter that does not depend on biology.”

England and Spain passed the first laws making it easier for a person to change her gender on official documents, in 2004 and 2007, respectively, and Uruguay followed suit in 2009. Three years later, Argentina passed the most progressive gender-identity law in the world. Not only are Argentines spared the usual requirement of reassignment surgery or a medical diagnosis to change identity documents, but medical practitioners are bound by law to provide them with free hormone treatment and gender-reassignment surgery. Colombia’s decree, which was issued by the president, lacks the reach and force of Argentina’s legislation, but it is striking just the same. Now, in Colombia, all an individual has to do to change his or her gender on official documents is appear before a notary public.

“Typically, we have to pressure the courts for change,” Mauricio Albarracín, the former executive director of Colombia Diversa, an L.G.B.T. advocacy group, told me. Lawmakers are openly hostile. A few years ago, a popular proposal to extend common-law marriage benefits to same-sex couples stalled in Congress because of conservative opposition; decades-long efforts to legalize abortion have been similarly fruitless. Colombia, like Argentina, can seem like an unlikely place for path-breaking trans-rights reform. As Alexa Kolbi-Molinas, a U.S.-based reproductive-rights lawyer, put it to me: “In Argentina, the state will pay for your gender-reassignment surgery, but you still can’t get a legal abortion.” The Catholic Church, which historically has played an outsized role in shaping public policy in Latin America, still has a strong influence over marriage and reproductive regulations, but a confluence of circumstances has made trans advocacy uniquely viable in these same countries.

Three years ago, a group of lawyers and trans advocates in and around Bogotá formed a broad coalition called Aquelarre Trans. Their aim was to re-create, or approximate, the gender-identity law in Argentina, which “supplied a push among activists,” Andrea Parra, the director of the Action Program for Equality and Social Inclusion (PAIIS) at the University of Los Andes School of Law, told me. The first question they debated was whether to advocate for legislation at all. Colombia’s Congress tends to be conservative, and lobbying could be costly and unproductive. Still, the appeal of such a law, particularly in the wake of Argentina’s success, was undeniable.

Argentina legalized same-sex marriage in 2010, after a hard-fought campaign in which President Cristina Kirchner clashed openly with the Church. “There was euphoria over the gay-marriage law,” Lohana Berkins, the founder of the Association for Transvestite and Transexual Identity, and one of the architects of the law, told me; the victory created momentum for a gender-identity law, mostly by weakening the Church’s hold over social issues. “It was a manner of breaking the abusive power of the Catholic Church and reactive elements of society, and this changed the sensibility of the country,” Berkins said. “It wasn’t just some legal advance—it put into question big issues.”

The gender-identity law was much less controversial than the same-sex marriage law in Argentina, partly because conservatives, who’d already expended considerable resources fighting against the marriage legislation, saw it as technical rather than symbolic. The law passed without a single vote against it in Congress. “The public saw gender issues as the question of a small group of people. The identity law didn’t focus on the bastion of family relations or abortion,” Constanza Tabbush, a social-science researcher at the University of Buenos Aires, said. This may explain why the gender-identity law was possible even as women’s reproductive rights stagnated. Elisabeth Jay Friedman, a professor of politics and Latin American studies at the University of San Francisco, told me that the push for trans rights can “read conservative” in Latin American countries. “Giving women full control over their reproductive capacity deeply challenges gender expectations and roles, and cannot be easily legitimized as part of a human-rights framework (though feminists have tried),” she said. “Getting people’s gender ‘right’ presupposes that gender is fairly static.”

Trans-rights activists in Argentina could also situate their claims in a national historical context. During the military dictatorship of the nineteen-seventies and eighties, many “disappeared” women gave birth at clandestine prisons, and their children were taken from them and given to citizens with ties to the right-wing government. These children were raised by people complicit in the torture and murder of their biological parents, and often were well into adulthood before they learned of their true origins. Human-rights advocates have increasingly pressed for a legal principle known as the “right to identity” to redress these injustices. For L.G.B.T. advocates, the vocabulary was resonant. “Trans people also want their identity recognized,” Friedman explained. “This was already a familiar term to the public.”

In Colombia, where the right to identity isn’t imbued with the same sense of history, Aquelarre Trans focussed its efforts on the acción de tutela, an individual petition for civil-rights protection that was introduced with other constitutional reforms in the early nineteen-nineties. (Given the region’s bloody history of autocratic repression, the ethos and rhetoric of human rights have more traction in mainstream conversations in Latin America.) Anyone can file a tutela in Colombia, Albarracín told me, although the profusion of petitions can sometimes make it hard for civil-rights organizations to coördinate their legal strategies. Aquelarre Trans started filing its own cases and increasingly signed on to others as “friends of the court.”

The Constitutional Court began delivering favorable rulings, at first in individual cases with limited reach and then in others with wider implications. One important string of rulings concerned whether women who were still registered as male could be called upon, like all men in Colombia, for military service. As the court continued to take cases, the country held national elections. In 2014, the center-right government of Juan Manuel Santos faced reëlection against stiff conservative opposition, and, after losing the first round of voting, he tacked left in order to round up a broader coalition. The L.G.B.T. community tended to avoid partisan politics, Albarracín said, but the stakes seemed higher this election cycle because of the extremism of Santos’s right-wing opponents. Activists supported his campaign, and when Santos won in June his victory brought in new, progressive-minded government ministers, many of them with personal ties to activists.

Six months ago, the Ministry of Justice called a meeting with Aquelarre Trans and another civil-rights group, called Dejusticia. It wanted to discuss a gender-identity measure. Activists had long been lobbying government officials, so when representatives of the ministry got in touch it wasn’t exactly a surprise, Camilo Losada, of the group Hombres en Desorden, another member of the Aquelarre coalition, said. “We’d already been applying pressure.” Together, government officials and coalition activists surveyed possible reforms. Officials heard stories about everything from police violence to more quotidian humiliations, like being refused entry into buildings because of confusion over identity documents. Making changes to document policies was an obvious place to start, Ana Bejarano, the justice minister’s chief of staff, said. “This was something our ministry could handle ourselves . . . We could have a direct response, a direct effect.”