An Iranian baby who had been banned from traveling to the US for life-saving surgery was finally allowed to enter the country and is now "out of the woods" after her surgery on Friday.

Four-month-old Fatemeh Reshad and her family flew to Portland, Oregon, where their relatives live, on Feb. 17 after receiving a waiver to enter the US. Reshad received surgery the same day.

Her physicians say it was more complicated because it's typically performed within days or weeks, rather than months, after birth, but that the family's delay in flying to the US wasn't necessarily enough time to affect her condition, according to the Associated Press.

"Her heart function looks beautiful," said Dr. Laurie Armsby, who works at the Oregon Health Sciences University's Doernbecher Children's Hospital.

Earlier this month, Reshad and her family had an appointment in Dubai to get a tourist visa to the US, before Trump's executive order caused it to be canceled.

The order banning travel to the U.S. by people from seven predominantly Muslim countries, including Iran. Fatemeh was forced to return home.

New York Gov. Andrew Cuomo said in a statement on Feb. 3 the infant, who was banned under President Donald Trump's executive order, would be allowed to travel for the emergency procedure to correct serious heart defects.