In order to keep Laila from being strangled to death, Mariam hits Rasheed over the head with a heavy shovel and kills him. She is consequently tried and convicted of murder and sentenced to death. No "extenuating circumstances" (such as Racheed's aggression and precedent history of violence) are taken into account.
In the end Mariam is indeed executed for her "crime," but Laila gets a fresh start in life when she is reunited with Tariq, her first love and father of Azziza, her daughter. They marry and live happily with Leila's two children, whom Tariq loves on equal terms, accepting both as his own.