certainly , as egypt was confronted with growing unrest and foreign aggression , the library became victim to persecution , mob violence , and military occupation , no longer enjoying special privileges .