
Encyclopedia Britannica:
As part of Adolf Hitler’s “final solution” for ridding Europe of Jews, the Nazis established ghettos in areas under German control to confine Jews until they could be executed. The Warsaw ghetto, enclosed at first with barbed wire but later with a brick wall 10 feet (3 metres) high and 11 miles (18 km) long, comprised the old Jewish quarter of Warsaw.

Beginning July 22, 1942, transfers to the death camp at Treblinka began at a rate of more than 5,000 per day. As the deportations continued, despair gave way to a determination to resist. A newly formed group, the Jewish Fighting Organization (Żydowska Organizacja Bojowa; ŻOB), slowly took effective control of the ghetto.
Resistance was successful for several months, then the Nazis cracked down.
In their final assault, the Germans had planned to liquidate the ghetto in three days. The Jews held out for nearly a month. Resistance fighters succeeded in hiding in the sewers, even though the Germans tried first to flood them and then force them out with smoke bombs. Not until May 8 did the Nazis manage to take the ŻOB headquarters bunker. Civilians hiding there surrendered, but many of the surviving ŻOB fighters took their own lives to avoid being captured alive; so died Mordecai Anielewicz, the charismatic young commander of the underground army.
The one-sided battle continued until May 16, becoming sporadic as Jewish ammunition was exhausted.