BIRMINGHAM, England (Reuters) - British Prime Minister Theresa May said on Tuesday the European Union was not the same as the Soviet Union after her foreign secretary provoked anger by likening the 28-member bloc to the USSR.

Britain's Prime Minister Theresa May walks to the Conservative Party Conference in Birmingham, Britain September 30, 2018. REUTERS/Toby Melville

Foreign Secretary Jeremy Hunt cautioned the EU on Sunday that it was set up to protect freedoms but the lesson from Soviet history was that if you turned it into a prison then the desire to leave would increase.

Asked whether Hunt was right to have made the comment, May said: “As I sit around that table in the European Union there are countries there who used to be part of the Soviet Union, they are now democratic countries and I can tell you that the two organizations are not the same.”

With less than six months until Britain leaves the EU, May has yet to reach a deal with the EU on the terms the Brexit divorce and rebels in her Conservative Party have promised to vote down any deal she makes.

Hunt’s comment on the Soviet Union provoked anger in Europe, especially among some eastern members of the EU which only regained full independence after the collapse of the Soviet Union in 1991.

Lithuania’s EU commissioner Vytenis Andriukaitis told Hunt he was born in a Soviet gulag forced labor camp and was jailed by the Soviet KGB state security agency.

“Happy to brief you on the main differences between EU and Soviet Union,” he said. “Anytime. Whatever helps.”

Former British diplomats said the remark was unwise.

“This rubbish is unworthy of a British foreign secretary,” said Peter Ricketts, the top diplomat in the Foreign Office from 2006 to 2010. “The EU isn’t a Soviet-style prison. Its legal order has brought peace and prosperity after a century of war.”

But some Brexiteers, who cast the EU as a stagnating project that will eventually collapse under its own weight, said Hunt was right.

“Jeremy Hunt is using my language, the EU is the new Soviet Union,” Brexit campaigner Nigel Farage said.

The Soviet Union, governed by the Communist Party from Moscow, presented itself as the champion of world socialism though opponents cast it as a ruthless empire which suppressed dissent and led to the deaths of millions.

Its rivalry with the United States dominated the 20th century, until it crumbled in 1989-1991 after Mikhail Gorbachev sought to reform the economy and institutions of the Soviet Union.