As in those instances, the mother in New York is believed to have been infected while traveling to one of the roughly 50 countries where Zika is endemic.

Health officials said that the baby with microcephaly tested positive for the virus after being born at a hospital in the city this month. They declined to provide additional details about the case, including whether the virus had been previously diagnosed in the mother, or if she was monitored as part of a national registry created to track pregnancy outcomes for those who become infected.

At a news conference on Friday, officials said the case should serve as warning to anyone who considered the virus to be just a theoretical threat and once again urged all pregnant women not to travel to countries where Zika is endemic.

“While not surprising, given the travel trends of our global city, this case is a strong reminder of the tragic consequences of the Zika virus,” Dr. Mary T. Bassett, New York City’s health commissioner, said in a statement. “We are monitoring the baby’s health closely and connecting the family with the necessary services to take care of their child.”

As of last week, 2,000 pregnant women in the city who had traveled to areas where there is active transmission of Zika had requested testing, officials said. Of those who have been tested, the virus had been confirmed in 41 as of July 15.