Grand Adm. Karl Doenitz, 89, who succeeded Adolf Hitler and signed Nazi Germany's surrender in World War II, died of a heart attack Wednesday at his home in the Hamburg suburb of Aumuehle, according to family members.

Relatives said he had been ill for several months and was hospitalized about four weeks ago.

Adm. Doenitz, who led Nazi Germany for 23 days after Hitler's suicide in April 1945, was the architect and commander of Hitler's submarine fleet and chief of the German Navy in the final stages of the war.

A member of the Nazi Party since its inception, he had announced Hitler's death to the German people in a radio broadcast on May 1, 1945, saying the late Fuehrer had appointed him as his successor.

Although Adm. Doenitz had vowed to continue the struggle against the "Bolsheviks," he immediately tried to negotiate a surrender. Knowing that Germany was defeated, he authorized Col. Gen. Alfred Jodl to sign the unconditional surrender demanded by Gen. Dwight D. Eisenhower, Supreme Commander of the Allied Troops.

He had lived in relative obscurity since his 1956 release from West Berlin's Spandau Prison, after serving a 10-year sentence imposed at Nuremberg by the International Military Tribunal for war crimes and crimes against peace.

Described as a ruthless, fanatical and dreaded military commander who had ordered his sailors to "kill and keep on killing" and who would scream "No survivors" and "Humanity is a weakness" at his U-boat commanders, Adm. Doenitz had maintained that his conviction was political and decried what he saw as prosecution of soldiers who only followed orders.

A spokesman for the West German Defense Ministry said he would not receive military honors and the Armed Forces would not send wreaths. The ministry also said West Germans soldiers were barred from attending in uniform any ceremonies connected with the admiral's death, although they could attend in civilian clothing.

The U-boats, which he had developed and made even more effective by assigning them to prowl the Atlantic in "wolfpacks," were one of the most feared forces of World War II. At war's end, they were held responsible for sinking 14 million tons of allied shipping, including 52,000 tons during the last five weeks of the war.

Nearly 100,000 British Merchant and Navy seamen lost their lives in "The Battle of the Atlantic" directed in part by Adm. Doenitz, who took full command of the Germany Navy in 1943.

Shortly after the German surrender, he tried to escape by sea.

Born in Berlin on Sept. 16, 1891, the future admiral began his naval career as a cadet in the Imperial Navy in 1910. He served as a naval officer in World War I and was taken prisoner by the British on Oct. 4, 1918.

After his repatriation, he was appointed commander of the German Navy's school ship Emden. In 1936, three years after Hitler's takeover, he was named commander-in-chief of the German Navy's submarine fleet.

In 1943, after a fallout between Hitler and the Navy's previous commander, Grand Adm. Erich Raeder, Doenitz was promoted to commander of the German Navy with the rank of Grand Admiral.

During the last phase of World War II, he devoted his attention to organizing the evacuation by sea of German refugees and defeated military forces from northeastern Europe via the Atlantic.

The war cost him his two sons, one of whom died serving in a submarine; the other on a torpedo boat. His daughter's husband also died in a submarine.

After leaving prison, where he was a prison mate of Rudolf Hess, Adm. Doenitz spent much of his time writing and carrying on correspondence with naval officers, including former Allied officers.

He maintained to the end of his life that his submarines would have cut the lifelines to the United States if Hitler had realized the strategic importance of the sea and given top priority to the submarine fleet.

In 1957, he as named an honorary member of the German Navy's veteran's association. The following year, he participated in a meeting of former German submarine captains.

Adm. Doenitz virtually ceased appearing in public after the death of his wife in 1962.