Police called off the search for survivors around 16 hours after the blast in Itzehoe, Schleswig-Holstein, when they found the body of the last missing person.
A 36-year-old man was declared dead soon after the explosion at 9am and three further people were missing, prompting a search in the rubble.
Police said on Tuesday that the fourth victim, found at around 1am, was a 45-year-old man who lived in the home.
Another 15 people were injured in the incident, two of them have life-threatening injuries and two are seriously wounded.
The blast shook neighbouring houses and meant around 100 people were not allowed to return home.
Eleven people were registered as living in the building. Three of them were among the dead and the fourth victim was a 58-year-old builder.
"The whole street is covered in debris," a spokeswoman for Itzehoe police said on Monday morning.
An investigation into what caused the explosion is continuing.