SYDNEY, Australia — Health officials in Australia on Tuesday confirmed two cases of the Zika virus in residents who most likely were infected on a visit to Haiti, and the officials also warned pregnant women not to travel to areas where transmission rates are high, like the Caribbean.

The two residents, from New South Wales, had mild cases of the virus when they returned from Haiti and have since recovered. The virus does not pose a serious threat to Australia, the Health Department said.

“It is very unlikely that Zika virus established local transmission in New South Wales as the mosquitoes, Aedes aegypti, that spread the infection are not established here — although they are found in some parts of North Queensland,” Dr. Vicky Sheppeard, the state’s communicable diseases director, said in a statement after confirming Australia’s first cases of the virus this year. Since 2014, “occasional” cases of Zika have been identified in New South Wales among people who had traveled to areas where the virus has been most commonly transmitted, the statement said.

The World Health Organization said on Monday that the virus was an international public health emergency. The main concern is the virus’s possible link to microcephaly, a condition in which babies are born with unusually small heads and, in the majority of cases, damaged brains.