"A" is used before consonant sounds, and "an" is used before vowel sounds. So, since "BA" begins with a vowel sound, we would use "an".