A Connecticut girl returned to class Friday morning for the first time since coming home from a trip to Nigeria and subsequently being barred from school out of fear of the Ebola virus.

The girl, Ikeoluwa Opayemi, 7, was allowed back at Meadowside Elementary School in Milford, reversing the school system’s earlier decision to keep her out of class for 21 days, the longest-known time it can take for symptoms of the disease to emerge. She and her father, Stephen Opayemi, had traveled to Nigeria to attend a family wedding.

The Opayemi family had sued the Milford schools after Ikeoluwa was prohibited from returning to class, arguing that the girl, who was not sick, did not pose a health risk since there are currently no known Ebola patients in Nigeria.

The 21-day ban would have expired over the weekend, allowing Ikeoluwa to return on Monday. But on Thursday, Milford’s superintendent of schools, Elizabeth Feser, and Mr. Opayemi issued a joint statement saying that the girl’s doctor had declared that “she is perfectly healthy and can take part in school activities, without restriction.”

The family’s lawyer, Gary Phelan, said on Friday afternoon that Ikeoluwa had not encountered any trouble on her first day back at school. “Her return to school went smoothly under the circumstances,” Mr. Phelan said. “It was all positive.”

The lawsuit, which both sides agreed to settle, came as several states, including New York, New Jersey and Connecticut, defended their decisions to quarantine healthy travelers returning from Guinea, Liberia and Sierra Leone, where the spread of virus has reached epidemic proportions.

Mr. Opayemi said the authorities had told him the ban, which exceeded state and federal Ebola policies, was intended to address local residents’ fears, whether justified or not. The family’s lawsuit described the prohibition as a violation of the Americans With Disabilities Act, which protects the rights not only of people with mental or physical disabilities, but also those of healthy people who are mistakenly treated as being ill.

Earlier this week, Mr. Opayemi explained why his family had sued. “We wanted to show our daughter that we fought for her in the future when she grows up,” he said. “The second reason is, I want to change the narrative about my daughter.

“She’s not a girl who was sent home because she had Ebola. This is a girl who was wrongly sent home because of irrational fear, ignorance and overreaction.”

A version of this article appears in print on , on Page A20 of the New York edition with the headline: Girl, 7, Barred From a Connecticut School Over Ebola Concerns Goes Back to Class. Order Reprints | Today’s Paper | Subscribe