DAKAR, Senegal — Nigeria has confirmed its first cases of the omicron coronavirus variant after three travelers arriving from South Africa tested positive, the Nigeria Center for Disease Control said Wednesday.

The travelers all landed in Africa’s most populous country over the past week, Ifedayo Adetifa, the NCDC’s director general, said in a statement. The infections are “widespread globally,” he added.

“Therefore,” he said, “it is a matter of when, not if, we will identify more cases.”

Confusion abounded, however, after the nation’s top health agency initially reported that omicron was found in samples collected in October, which would have made Nigeria the first place the variant was known to have existed. The wording of the statement was subsequently changed.

A medical official who works with the NCDC, speaking on the condition of anonymity because of the sensitivity of the subject, told The Washington Post that the information was a mistake, saying the passengers were actually swabbed in the last days of November.

Nigeria was the first West African nation to record an omicron infection since scientists in southern Africa flagged the variant last week. Ghana also confirmed cases Wednesday, saying the variant was detected in people entering the country from Nigeria and South Africa.

Thus far, around two dozen countries have reported detecting omicron.

The United States and other nations responded to the announcements with travel bans targeting southern African countries — against the advice of the World Health Organization — igniting outrage across the continent. Scientists condemned the move, saying it could discourage nations from sharing lifesaving information as the pandemic evolves.

“Instead of vilifying South Africans, we should be praising them,” said Christian Happi, director of the African Center of Excellence for Genomics of Infectious Diseases in Ede, Nigeria.

Dutch officials reported Tuesday that omicron was in the Netherlands and other European countries before South Africa rang the alarm, though the first samples of the new variant were in people who came from southern Africa. Scientists caution that little is known about the variant, which has been linked to a surge of cases in South Africa. Information on how speedily it spreads or if it resists vaccines isn’t expected to be available for weeks.

“It’s very possible that it has been here way before,” said Happi, who runs a sequencing laboratory in southwestern Nigeria, “but it’s too early to say.”

South Korea announced its first five cases of omicron on Wednesday — all with links to Nigeria — and earlier this week, Canada reported that its first two cases of the variant were detected in people returning from a trip to the West African nation. A case in Hong Kong was also in someone who had traveled to Nigeria.

Since the pandemic began two years ago, most African nations have recorded comparatively fewer coronavirus cases. Health officials caution that testing remains limited in many areas and that travelers tend to make up a significant share of those being swabbed.

The continent also has the slowest regional vaccination rate. Fewer than 2 percent of Nigerians are fully vaccinated. The nation of 213 million has counted about 214,000 coronavirus cases and 2,977 deaths.

Read more: