Ms. Sobchak is the daughter of a former mayor of St. Petersburg, Anatoly A. Sobchak, who was Mr. Putin’s mentor for years and who died in 2000 while campaigning for Mr. Putin. Mr. Putin managed Mr. Sobchak’s final, unsuccessful campaign in 1996; his animosity toward electoral politics is said to date partly from that loss.
Portrayed sometimes as the Russian equivalent of Paris Hilton, Ms. Sobchak has long exhibited her upscale lifestyle on social media, including Instagram, where she has some 5.2 million followers. Her account is an endless parade of Paris fashion shows, yoga retreats, yachts and expensive restaurants. She is married with an infant son.
After announcing her candidacy, Ms. Sobchak, in a 30-minute interview on TV Rain, or Dozhd, a small opposition television channel, said she had recently seen Mr. Putin to interview him about her father for a documentary and told him of her intention to run. He did not seem pleased, she said.
“He said that every person can make their own decisions and take responsibility for them too,” said Ms. Sobchak. “I didn’t feel that he liked my decision.“
Dmitri S. Peskov, Mr. Putin’s spokesman, described Ms. Sobchak as “talented” in a comment to TV Rain but suggested that she had a lot to learn.
“She’ll have to make herself familiar with this from scratch,” Mr. Peskov said. “Politics is different from journalism and from show business. This is a completely different matter.”
Some leaders of the liberal opposition expressed dismay, accusing her of being a Kremlin stooge and a spoiler candidate meant to inject a measure of excitement and legitimacy into a dull race. Mr. Putin, having run Russia as president or prime minister for almost 18 years, is due to seek his fourth term as president with no real opposition. He has yet to formally announce that he will run, but is expected to do so by December.
Sergey Udaltsov, a political activist recently released from prison, compared it to the last campaign, in 2012, when many believed that the Kremlin convinced Mikhail D. Prokhorov, a billionaire businessman and the principal owner of the Brooklyn Nets, to run.
“The Sobchak thing is too obvious,” Mr. Udaltsov wrote on Twitter, using a Russian expression for something evident: “The Kremlin’s ears stick out for a kilometer.”
Mr. Navalny and his top aides are serving yet another brief prison sentence over their campaign organizing, so they could not respond to the formal announcement. But the two camps were already sniping at each other last month, when rumors that Ms. Sobchak might run first began to circulate.
Mr. Navalny said he was “frustrated and upset” at the prospect, while his campaign manager, Leonid Volkov, said it seemed like a bad joke. “It would be better if this remained a joke,” he wrote on Facebook. “Or else it will turn into a very stupid story.”
Ms. Sobchak said in her TV interview that she hoped to gain Mr. Navalny’s support after he is released, and said she would discuss withdrawing if he were somehow allowed to run.
In her work as a television journalist and talk-show host, Ms. Sobchak has been unofficially banned as a presenter on state television since she joined the anti-Kremlin protests in 2012. Some portrayed her candidacy as a means to escape from the confines of TV Rain, which can only be watched online or on cable.
“She is too glamorous for Navalny’s electorate, but she can be supported by people who are protesting against the country becoming increasingly conservative, by people who are against clericalism,” said Aleksei V. Makarkin, a political analyst and deputy head of the Center for Political Technologies, a Moscow think tank.
Although it is impossible to gauge her support at this early stage, he said her main motivation seemed personal. “Sobchak doesn’t want to create a party,” he said in an interview, “I think she wants to be a star.”
Others were taken with the idea.
“Personally, I don’t like Navalny’s dictatorial tendencies and believe that Sobchak is a good candidate to consolidate representatives of the liberal opposition,” said Vladislav Inozemtsev, a political analyst who leads the Center for Post-Industrial Studies, another Moscow think tank.
“Russia needs a leader who will be more of a visionary, instead of a manager with a lot of experience at stealing government money or being obsequious to the superiors,” he said. “In any case, this leader should be a modern, open-minded person. In these terms, Ksenia is an ideal candidate.”
There are considerable hurdles for any opposition candidates entering the presidential race, and particularly a woman. A candidate has to be either nominated by a party in the federal Parliament, called the Duma, or collect 300,000 signatures from at least 40 Russian regions. The latter is considered impossible without vast financial resources or months of organizing.
In addition, a recent poll by the Levada Center, a research organization, suggested that 53 percent of respondents were opposed to a woman’s being president of Russia and 32 percent said no woman in Russia was currently fit for the job.
TV Rain said Ms. Sobchak’s campaign adviser would be Vitali Shkliarov, a Russian who worked on Bernie Sanders’s 2016 presidential campaign in the United States. In recent months, Mr. Shkliarov has been preaching the gospel of a more equitable, more disruptive political process in Russia, pushing many novice politicians to run successfully for seats in local municipal councils in Moscow.
Over all, the general sense was that whether she was a Kremlin stooge or not, the entrance of a glamorous young woman into mainstream Russian politics would make what many consider a farcical race even more fantastic.
“A circus with horses,” Viktor A. Shenderovich, one of the country’s most prominent political comedians, wrote on Facebook. “A new program.”