The group of girls, who had been beating her, took away her backpack, dumping its contents into the water and street.
The group of girls took away her backpack. The group of girls were dumping its contents into the water and street. The group of girls had been beating her.