LONDON, JULY 14 -- British Trade Secretary Nicholas Ridley resigned today after his criticism of West Germany and the European Community sparked a political uproar across Europe.

In an interview with the Spectator magazine, Ridley had accused West Germany of trying to take over Europe and said giving up British sovereignty to the EC was like surrendering to Adolf Hitler.

"In view of the controversy aroused by the publication of the article in the Spectator this week, I think it is now time for me to leave your government," Ridley, 61, said in his resignation letter to Prime Minister Margaret Thatcher.

Thatcher replied that his departure would leave a "great gap" in her cabinet.

Ridley, one of Thatcher's closest political allies, was replaced as trade and industry secretary by Peter Lilley, 46, a senior minister at the Treasury, Thatcher's office said.

In the interview, titled "Saying the Unsayable About the Germans," Ridley said it was useful to remember the lessons of World War II.

Referring to last week's visit by West German Bundesbank President Karl Otto Poehl to promote European monetary union, Ridley said: "This is all a German racket designed to take over the whole of Europe. It has to be thwarted."

"This rushed takeover by the Germans on the worst possible basis, with the French behaving like poodles to the Germans, is absolutely intolerable," he told the editor of the right-leaning Spectator.

Ridley also attacked the European Community, where Britain has been accused of being isolationist on the question of monetary union.

"When I look at the institutions to which it is proposed that sovereignty is to be handed over, I'm aghast," he said. "I'm not against giving up sovereignty in principle, but not to this lot. You might just as well give it to Adolf Hitler, frankly."

Although Ridley later retracted his remarks and Thatcher made it clear that she did not endorse them, several members of the ruling Conservative Party joined the opposition in pressing for Ridley to quit.

Opinion polls in two newspapers showed a good deal of support for Ridley, but critics said he could hardly continue to represent British trade interests after upsetting key trading partners in Europe.

Ridley, the son of a viscount, was the fourth minister to leave Thatcher's cabinet in as many years.