Routine HIV testing of all pregnant women in Oman has been introduced without prior knowledge of women’s attitudes towards testing or their behaviour in the event of a positive test. This study recruited 1000 Omani pregnant women from antenatal clinics to explore their knowledge of HIV/AIDS, attitudes towards HIV testing and intended behaviours in the event of a positive test. Mother-to-child transmission was recognized by 86.6% of the women but only 21.0% knew that it was preventable and a few acknowledged the important role of antiviral drugs. Half of the women (51.9%) reported having been tested for HIV and 75.8% agreed about routine HIV testing for all pregnant women. A higher level of knowledge was significantly associated with a favourable intended behaviour related to voluntary testing, disclosure and seeking professional assistance in the event of a positive HIV test. The results are discussed in relation to opt-in and opt-out approaches to voluntary testing during pregnancy.