Russia and the European Union signed a deal agreeing conditions for the resumption of EU fresh vegetable imports to Russia, which banned them because of a deadly E.coli outbreak, both sides said.

The deal followed bitter recriminations over a halt on trade that earned EU producers some 600 million euros ($860 million) last year, with Russian Prime Minister Vladimir Putin warning of "poison" and the EU saying the blanket ban was unjustified.

The European Commission said each EU state exporting fresh vegetables to Russia will have to certify -- for a limited period -- the origin of the produce and the absence of the E.coli strain responsible for the outbreak in northern Germany.

"Following today's agreement I now expect a swift resumption of EU exports to Russia," John Dalli, the EU commissioner in charge of health and consumer policy, said in a statement after the agreement was signed in Moscow.

"Both sides have shown goodwill to make sure that this incident is now behind us," he said.

Russia said the deal did not imply an immediate end to the ban, introduced on June 2, adding it will resume imports when Brussels provides a list of official bodies and laboratories authorised to issue food safety certificates and conduct tests.

"Everything now depends on them," Gennady Onishchenko, head of Russia's state consumer protection watchdog, told Reuters. "It (the deal) does not mean that everything will immediately return to the Russian market."

"We are now waiting for a list of competent national bodies and laboratories authorised to issue such documents on behalf of the EU Commission. Only after that can European products enter the Russian market," he said.

Onishchenko said it was unclear exactly when imports could resume. "Such things are not done in a second".

Onishchenko said the EU had agreed to conditions set out by Russia during the Russia-EU summit in Nizhny Novgorod last week.

The certification system will be in force until 10 days after there is no new reported human case linked to the E.coli outbreak reported.

Moscow imposed its import ban in response to the outbreak which killed more than three dozen people.

The source of the outbreak initially baffled German authorities before being traced to contaminated bean sprouts and shoots from an organic farm in Lower Saxony.

The EU, which exported nearly 600 million euros of vegetables to Russia last year, had protested to Moscow that such a broad ban was not scientifically justified. The EU envoy to Moscow suggested the ban could jeopardise Russia's campaign to join the World Trade Organisation if left in place too long.

Russia is under pressure from Europe and other trade partners to announce how it will end protectionist measures, including meat import restrictions, as part of its push to join the 153-nation WTO this year after an 18-year effort.

Vegetable imports from the EU take up about a fourth of Russia's total vegetable imports, according to data from the agriculture ministry, but mainly take place in winter months when there are not enough homegrown vegetables in Russia.

Frozen vegetables, which were not banned, will be traded outside the framework of the agreement.