Russia has expelled a prominent French writer and journalist three weeks before the country's presidential election, in the latest move by the authorities against press freedom.

Immigration officials detained Anne Nivat on Friday, after she met members of Russia's opposition. The officials interrogated her for four hours. They then annulled her multi-entry business visa and told her she had to leave Russia within three days. She flew back to Paris over the weekend.

Nivat, a former Moscow correspondent and the author of an acclaimed book on Chechnya, had been conducting interviews for her latest book. She said that the officials from Russia's federal migration service (FMS) made it abundantly clear that they were unhappy about her contacts with locals opposed to Vladimir Putin.

Russia's prime minister has faced unprecedented street protests in the wake of parliamentary elections last December, widely seen as having been rigged. Despite middle-class discontent with his rule, Putin is certain to win the presidential election on 4 March. So far he has made few concessions to protesters, dismissing them as western stooges and comparing their white ribbon to a condom.

Formally, FMS officials accused Nivat journalist of "violating" the terms of her business visa. "It clearly didn't please them that I was having conversations with people from the opposition – they clearly said it many times," Nivat told the Wall Street Journal in an email on Monday, adding that she had been under surveillance for several days before the officials swooped.

Rights groups said Nivat's expulsion was the latest cack-handed move by the Kremlin, which stands accused of failing to properly investigate the killings of crusading Russian journalists, including Anna Politkovskaya, shot dead in Moscow in 2006, and of using KGB tactics against reporters who displease those in power.

"We call on Russian authorities to allow Anne Nivat to return to the country and report on the important events in the run-up to March presidential elections without fear of reprisal," said Nina Ognianova, of the New York-based Committee to Project Journalists.

She made clear: "Cancelling Nivat's business visa because she interviewed members of the Russian opposition is an unacceptable reprisal for doing her job as a journalist."

The head of the FMS, Konstantin Romodanovsky, hinted on Monday night that Nivat's expulsion might be reversed. "Preliminary facts show that the decision was wrong. Perhaps, it will be overturned, Romodanovsky said, according to the state news agency RIA Novosti. On Tuesday he said he had fired the head of the FMS in Vladimir, the BBC's Russian service reported.

In his blog, writer Andrey Dmitriev described how officials turned up at Nivat's hotel in Vladimir and took her to their headquarters. He suggested that the official explanation for the journalist's expulsion – that she had "broken the rules" – was absurd.

"Anna didn't just meet with representatives from the opposition, but with a wide spectrum of people – from my colleagues to the inhabitants of villages in Karelia … Anna asserts that nothing similar happened during her numerous previous working trips to Russia," Dmitriev wrote.

Before her deportation, Nivat had travelled to several areas of Russia, including Petrozavodsk in Russia's picturesque European north-east. She met representatives of Yabloko – the liberal party whose leader, Grigory Yavlinsky, has recently been disqualified from standing in next month's elections against Putin – as well as local communists.

In 1998, Nivat became a correspondent for the French daily newspaper Libération in Moscow. She has also reported for other newspapers from Russia, including Le Soir, Ouest France, Le Nouvel Observateur and the Washington Post.

The following year Nivat travelled undercover to Chechnya disguised as a peasant. Her book, Chienne de guerre. Une femme reporter en Tchétchénie, describes her experiences of daily life during the Kremlin's brutal second war in Chechnya.