Nina Pham, a 26-year-old nurse who became infected with Ebola while caring for a Liberian patient, walked out of a Maryland hospital on Friday, thanked God and others for her recovery, then went to the White House for a hug from President Obama before her return home to Dallas.

Jubilantly declaring that “hope just went up a notch today,” Dr. Francis S. Collins, director of the National Institutes of Health, said that Ms. Pham was virus free after her release from the Institute’s Clinical Center in Bethesda, Md.

In brief remarks, Ms. Pham, the first person infected with Ebola in the United States, beamed as she thanked God, her family and her friends. Flanked by her sister and her mother, she called the infection “very stressful and challenging,” and said she was looking forward to reuniting with her dog, Bentley, who officials in Texas had indicated was also virus free.