Hazrat Anas (may Allah be pleased with him) narrates that when you encounter a woman, keep your gaze lowered until she has passed by.