At the time of their surrender on May 7, 1945, Nazi forces had all but disintegrated. Adolf Hitler had committed suicide and Soviet forces had already taken Berlin, which resulted in 70,000 Nazi soldiers putting down their arms.
The failure of Nazi troops to check this advance resulted in them having no choice but to sign a treaty of unconditional surrender. The declaration of surrender stipulated that Nazi Germany recognize the authority of the Soviet Union and Allied forces. Nazi forces also had to immediately cease hostilities and remain in their bases. The signed Act of Surrender went into effect on May 8, 1945.
Immediately after the surrender, Gen. Dwight D. Eisenhower, the supreme Allied commander, sent out a top-secret cable announcing the unconditional surrender of Nazi Germany and the victory of the Allies.
John S.D. Eisenhower, son of the general, recounts the moment of Germany’s total surrender in his book, “The Bitter Woods: The Battle of the Bulge”:
General Eisenhower was sitting in his office awaiting the outcome of the surrender negotiations. Past the desk of his secretary and into the office came the Nazis, erect and cold. Eisenhower stood up. Rigid, and fixing a cold eye on his enemies, he demanded, “Do you understand all the provisions of the document you have just signed?”
“You will, officially and personally, be held responsible if the terms of this surrender are violated, including its provision for German commanders to appear in Berlin at the moment set by the Russian High Command, to accomplish formal surrender to that government. That is all.”
The Nazis saluted and left, and Eisenhower relaxed. A few minutes later he sent a message to the Combined Chiefs of Staff: “The mission of this Allied Force was fulfilled at 0241, local time, May 7th, 1945.”
Although these documents put an end to the war with Nazi Germany, the Empire of Japan continued to fight for an additional four months before it finally surrendered on September 2, 1945.
Only once Japan surrendered was World War II officially brought to a close.
Read more here