U.S. District Judge Michael Baylson says he is granting the temporary request because of the severity of Sarah Murnaghan's condition.
Her mother, Janet Murnaghan, says the family is thrilled by the ruling. It's in effect until a June 14 court hearing.
The family is challenging organ transplant rules that say children under age 12 must wait for pediatric lungs to become available. The Murnaghans say that rarely happens.
Sarah's doctors believe they can perform a successful transplant with adult lungs.
Sarah has been hospitalized at Children's Hospital of Philadelphia for three months with end-stage cystic fibrosis.
On Tuesday, Health and Human Services Secretary Kathleen Sebelius declined to intervene.