Svetlana Davydova, left, was released from prison on Tuesday. Photograph by Pavel Golovkin / AP

At a little after eight in the morning on January 21st, a police officer knocked on the door of the apartment that Svetlana Davydova shares with her husband, Anatoly Gorlov, and their seven children. The family lives in Vyazma, a town of fifty thousand people that lies a hundred and seventy miles west of Moscow, and is set along a zig-zagging river and watched over by three skinny onion domes of the seventeenth-century Hodegetria Church. Through the door, Gorlov asked the officer what the problem was. “Your neighbors are complaining about noise,” the man replied.

As Gorlov remembers it, when he opened the door approximately twenty men dressed in black, with weapons slung over their backs, rushed into the apartment. He saw a gold necklace on one and immediately thought of the jewelry favored by nineties-era Russian gangsters. “Bandits!” he yelled to his wife. “F.S.B.,” said one of the men, producing a badge that identified him as a member of Russia’s domestic-security service, the main successor to the K.G.B. “Where is Svetlana Vladimirovna?” asked another officer, who presented himself as a colonel from a special-cases unit. They found Davydova, who is thirty-six, standing in the entryway, clutching her two-month-old daughter, Cassandra. “We’re taking you away,” the officer told her.

When Gorlov protested, the F.S.B. officer pulled out a court-issued protocol that charged Davydova, under Article 275 of the Russian criminal code, with high treason. He remembers thinking that it was an “act of foolishness, a horrible mistake.” His wife was a thoughtful and at times energetic citizen, who organized small-scale campaigns for local issues; like him, she was opposed to Russia’s involvement in the war in eastern Ukraine, but she was not a committed activist, let alone some sort of spy. Nonetheless, she now appeared to be the first person to be arrested under an amended version of Russia’s treason law, the revision of which had been proposed by the F.S.B. in the wake of anti-Kremlin protests in late 2011 and early 2012.

After some of the agents led Davydova out of the apartment, the remaining ones searched the Soviet-era apartment, a cramped two-bedroom full of children’s beds, inflatable balls, and stuffed animals. (The couple has four children together and three from Anatoly’s first marriage; the oldest is fourteen.) At one point, an agent found a notebook with the word “notebook” written in English on the cover, and asked why the family had items marked up with foreign languages. And why did they have so many mobile phones? So all the children can be in touch with us, Gorlov said. The agents confiscated a computer, two laptops, six mobile phones, eight credit cards, and a pile of old train tickets.

They also left Gorlov with an arrest warrant outlining Davydova’s supposed crime. It stated that she had placed a call to the Ukrainian embassy in Moscow in April, at the start of the war in Ukraine between the government in Kiev and Russian-backed rebels in the east. She was accused of having warned the embassy that Russian troops stationed in Vyazma might be en route to Donetsk, the rebel-held capital in the east. The warrant noted that Davydova and Gorlov’s bedroom window looks out over a base that hosts an élite brigade of the G.R.U., Russia’s military-intelligence service. Davydova, it read, had observed that the base had emptied out.

At around the same time, the warrant alleged, she had taken a ride in a shared taxi in town. Gorlov later described this trip to the newspaper Kommersant, saying that his wife had overheard a passenger, who appeared to be a military officer, talking into his cell phone about an upcoming assignment in which he and his comrades would travel to Moscow in civilian clothes, and from there to an unspecified mission. Could that mean eastern Ukraine? His wife wanted to “prevent possible suffering,” Gorlov told the paper. During their search, F.S.B. officers had also found her diary, and they included several entries in their report. She had written of her hope to “save the lives of Ukrainians and the territorial integrity of the country” and, in another passage, that “sooner or later my views could lead to repression.”

For allegedly passing along to the Ukrainian embassy what amounted to a collection of observations and guesses, Davydova was facing up to twenty years in prison. Even by the standards of Russian jurisprudence, the case struck many as particularly harsh: a housewife and mother of seven children, one of whom was still breastfeeding, had been taken from her family and ordered held in Moscow’s high-security Lefortovo prison, pending trial. (During the Soviet period, the K.G.B. held political prisoners at Lefortovo; it is now run by the F.S.B.) Davydova’s first, state-appointed lawyer did not seem prepared to offer an especially vigorous defense. “The case hasn’t just been made up, and there is information available that justifies it,” he told a Moscow radio station.

The Davydova affair was of a piece with other punitive and, at times, absurd prosecutions that had taken place since Vladimir Putin’s return to the Presidency in May of 2012, a period of purposefully heightened suspicion and hostility. In the wake of Putin’s standoff with the United States and Europe over Ukraine, and an economy that has severely weakened of late, Russian officials and state media have kept society on edge, wary of the West’s machinations and afraid of plots hatched from within. State officials and propagandists presented Davydova in this light. “We are dealing undoubtedly with an infliction of damage to the country’s security,” Alexander Khinshtein, a prominent lawmaker, said last week.

But Davydova quickly began to gather sympathy, becoming a cause célèbre for the country’s liberals and independent media outlets—ever-shrinking and demoralized constituencies, but ones still capable of periodic vibrancy. A petition hosted by Novaya Gazeta, a liberal newspaper in Moscow, gathered tens of thousands of signatures, including those of Andrey Zvyagintsev, the Oscar-nominated director of “Leviathan,” and Natalia Solzhenitsyn, the widow of Aleksandr Solzhenitsyn. Compared to the government’s usual targets in such cases, Davydova appeared especially undeserving: she may have been a kind of naïve peacenik, but she was not a credible threat to state security.

The attention apparently convinced the Kremlin that Davydova’s detention was becoming a liability. On Tuesday afternoon, nearly two weeks after the arrest, her new lawyers, Sergey Badamshin and Ivan Pavlov, got a call from the F.S.B.’s lead investigator on the case. Come by this afternoon, the officer said. When they showed up, he told them that Davydova would be released. The treason charge would remain, but she would be free to await trial at home in Vyazma. “They sat there with stone faces,” Badamshin told me. “No thuggishness, very professional. But with a kind of pale look, as if they have to explain themselves to their bosses.” He speculated that Davydova’s arrest had stemmed from “an excess of execution,” in which mid-level F.S.B. officials had decided to seize on the official mood with too much enthusiasm. “I can suppose there will be a huge showdown inside headquarters,” he said, adding that he nevertheless expected the F.S.B. to “protect its own snout, rallying to defend its esprit de corps.”

Not long after Badamshin and Pavlov’s meeting with the F.S.B., Davydova was released. She walked out of Lefortovo and into a snowy Moscow evening alongside her lawyers, then headed straight back to Vyazma. She arrived sometime after three A.M., and was greeted by Gorlov and their children.