BigLaw etiquette question: who gets the elevator?

Today the elevator was packed. One spot left. I’m a 6th-year at a V100, and a 2nd-year at a V5 was waiting next to me.

No one says anything. I just get on, and he takes the next elevator. I did this because in my mind I arrived a bit earlier than he did but can't recall perfectly.

Now I’m wondering if I committed a social faux pas.
In a situation like this, who is supposed to get the spot: the more senior person, or the person from the higher-ranked firm? Also, does it matter which practice groups we are in?

Obviously not a serious issue, but curious what the unwritten BigLaw etiquette is here.

Author: Realistic-Claim-3686