In a newspaper article I read a sentence:
Women had begun to outnumber men as the namaz began at the shrine.
We usually use:
(Past simple + as + past sample)
(Past perfect + before + past simple)
I had finished speaking to her before I got off the bus.
The light went out as I plugged in the charger.
If I use before instead of as in the newspaper sentence.