A resurgence of Ebola in the last week in Liberia, which had been declared free of the disease, may have originated with a survivor still carrying the virus, according to scientists who analyzed the genetic sequence of the virus from the body of a 17-year-old Liberian boy who died of Ebola last week.

The boy’s virus did not match strains still circulating in the continuing outbreak in Guinea and Sierra Leone, meaning he was unlikely to have caught the virus through cross-border travel.

“The origin of this virus is Liberian,” said Stuart Nichol of the Centers for Disease Control and Prevention. “Based on the absence of reported cases for several months, this does push us toward thinking about a possible sexual event as an early step in this cluster of cases.”

Liberia’s last confirmed case, in March, was also suspected to be linked to sexual transmission, because the virus isolated from that patient, Ruth Tugbah, who died, closely matched that detected in the semen of her boyfriend, who had recovered from Ebola months before she fell ill. The genome of Ms. Tugbah’s virus was different from the newly sequenced case and not thought to be connected to it.