The House Committee on Appropriations voted to grant terminally ill UK infant Charlie Gard American residency, bringing the case one step closer to upending one of the most controversial debates over medical ethics in the UK.

Two weeks ago, it looked like the Charlie Gard case was nearly over. Chris Gard and Constance Yates, Gard’s parents, lost their appeal at the European Court of Human Rights to take their son to the US to receive experimental treatment. It looked as if the recommendation of London’s Great Ormond Street Hospital (GOSH) to take Gard off a ventilator and provide palliative care would be carried out, on the grounds that keeping Gard alive and in pain would cause him undue suffering. The parents were given the weekend to say goodbye to their son.

But after a public media outcry that has included both Pope Francis and President Trump, the final decision to take Gard off the ventilator was postponed. And after more back and forth in courts between the parents and the hospital, the US stepped in.

Rep. Jeff Fortenberry (R-NE) announced via Twitter that the committee passed an amendment granting permanent resident status to Charlie Gard in the hopes of easing the legal barriers preventing him from traveling to the US for treatment. The amendment in the committee was introduced by Jaime Herrera Beutler, whose own daughter had been born with a rare, normally fatal disease, but who had survived after treatment. The amendment — to an already-contested bill that includes funding for Trump’s controversial border-wall — must pass through both the House and Senate to become law.

We just passed amendment that grants permanent resident status to #CharlieGard and family so Charlie can get the medical treatment he needs. — Jeff Fortenberry (@JeffFortenberry) July 18, 2017

Reps. Brad Wenstrup (R-OH) and Trent Franks (R-AZ) sponsored the bill. They said in a statement last week that the bill follows New York-Presbyterian Hospital and Columbia University Irving Medical Center in offering experimental therapy for the child, pending emergency FDA approval for the treatment developed by Dr. Michio Hirano of Columbia University called nucleoside bypass therapy.

It’s not yet clear how the bill would affect Gard in practice. Gard, like a dual citizen proper, would still be subject to the British law governing his current position in the hospital. Neither is it an automatic guarantee that Gard can come to the US for treatment. Instead, the sponsors said, making him a permanent resident would ease the process of getting him across the Atlantic.

Because Hirano has been developing a therapy that could potentially be used for Gard’s specific brand of mitochondrial DNA depletion syndrome (in the past, the therapy has been used on similar conditions), the doctor has been in the UK this week to evaluate the boy and to determine whether Gard can withstand the treatment and the traveling that would be required to carry it out.

The court hearings about Charlie Gard’s case have been emotional

GOSH, where Gard has been a patient since his condition became evident last October, applied for a new hearing at the high court on July 7, after the parents claimed to have new medical evidence that Hirano’s experimental treatment could be more successful than previously believed. (It was the previous opinion of GOSH’s doctors that the treatment, already unlikely to work to thwart further damage, could not undo the significant brain damage Gard already had.)

The proceedings began with a preliminary hearing July 10 with a request by Justice Richard Francis, who presided over the original case. Gard’s parents were asked to produce the necessary medical evidence within 48 hours. That hearing, and a subsequent hearing last Thursday, was characterized by emotional outbursts on the part of the parents: Last Monday, Gard’s father shouted to GOSH’s lawyers, "When are you going to start telling the truth?” Last Thursday, both parents stormed out of a morning court hearing after Justice Francis alluded to earlier comments by the parents that they would not want to see their son kept alive in his reduced condition indefinitely.

Tensions also arose between GOSH doctors and Gard’s parents over the size of the baby’s head — an increase in brain size (which hospital measurements dispute but Yates insists her own measurements support) could indicate brain development. "It is absurd that the science of this case is being infected by the inability to measure a child's skull,” Francis said at the hearing.

The medical evidence under consideration at the hearing came from Hirano, who has offered nucleoside treatment more generally in the past, and who testified in this instance via live video. Hirano was not named at the time of the hearing for legal reasons but has since identified himself publicly. The doctor, who had contacted the White House following Trump’s tweets on the matter on July 3, said that in his opinion, there would be about a 10 percent chance of improvement, far higher than previously stated, citing preliminary studies of the therapy on mice. Nucleoside therapy is a therapy, not a cure, for Charlie’s condition, mitochondrial DNA depletion syndrome, and would not save Gard’s life long-term in either instance.

Hirano, while testifying, also said that, contrary to the opinion of the GOSH doctors, he did not believe Gard could feel significant pain as a result of being on the ventilator. Hirano had not previously examined Gard in person until this week.

Monday, Hirano arrived in London to examine Gard at GOSH, which offered to temporarily grant him the same status as other physicians there. Hirano and a second unidentified medical colleague reportedly spent five hours trying to convince GOSH doctors of the potential of nucleoside therapy for Gard, although his precise findings have not been yet reported, and further hearings in the UK are expected this week.

Correction: an earlier version of the article misstated the body that had voted on Gard’s permanent residency. It is the House Appropriations Committee.