There were 2 full brigades of perhaps Ukraine's most committed forces defending Mariupol and later Azovstal.John wrote:
Anyway overall I believe amount of defenders in Mariupol were vastly overestimated perhaps Ukraine didn’t have defenses prepared or Russia over committed its forces 10-15 BTGs to take whats turning out to be less than 2000 defenders (currently about 300 Azov are there and couple hundred marines were captured, so if we thriple that to account for dead and those who escaped).
These were the 36 Marine Brigade and the National guard brigade, built around the Azov force.
Also, police, conscripted citizen militia and foreign volunteers (officially designated by Ukraine as a foreign legion).
We can quibble about the size of the defending force. In my view it was not very different from the size of the attacking force - which in theory is not sufficient to prevail in urban combat. In Fallujah, a US division, a UK brigade and Iraqi forces together fought around 3500-4000 insurgents.
Wherever there was urban combat, the Russians prevailed, which is why the defenders retreated to the Azovstal complex. If the Russians had assaulted that complex, it would have been Stalingrad tractor factory ver 2.0 Far more sensible to lay siege.