Could anyone please explain the usage of "as" used in the following sentence? I surmise the first "as" means because, and the second and third ones something like while. Thank you.
"But that policy ultimately changed, as Turkey worked to secure its borders, under pressure from its allies as it took in millions of Syrian refugees and as terrorist attacks rocked the country."
And one more, incidentally. Why is "," (comma) necessary just before "under pressure from..."? Is it a must in this kind of context? I am much confused, actually.
source:
http://www.nytimes.com/2017/01/02/world/europe/istanbul-nightclub-attack.html?ref=world&_r=0