A young man who was denied a double lung transplant in Utah after doctors found trace amounts of marijuana in his system has died from complications of the life-saving procedure he finally received in a different state.

Riley Hancey’s five-month fight for his life came to an end on Saturday at the University of Pennsylvania in Philadelphia, where he underwent emergency surgery late last month following a severe bout of pneumonia, his family said. The avid skier and outdoorsman had celebrated his 20th birthday at the hospital only days before his before his death.

“It has been a long battle to save Riley’s life. We know that in our hearts we gave him every opportunity to survive,” his brother, Zachary Hancey, wrote in a statement published to his Facebook page. “He will live in our hearts forever. He is now free to climb every mountain and run every river and will continue to do so with his family in spirit.”

Riley Hancey’s battle drew attention following a report earlier this month by BuzzFeed News, which used the Park City man’s case to illustrate how there are no federal laws or policies to outline how hospitals deal with marijuana users who need organ transplants. More than half of all states in the U.S. now permit the legal use of medical marijuana while eight states, along with Washington D.C., have legalized recreational weed for adults.

What began as the the flu for Hancey around Thanksgiving last year quickly morphed into a deadly case of pneumonia. One of the young man’s lungs collapsed and he was eventually placed on life support at the University of Utah Medical Center while he awaited a transplant.

The Utah hospital, however, ultimately denied Hancey a spot on its transplant list because he had tested positive for small amounts of THC, the psychoactive chemical in marijuana, his father Mark Hancey told KSL earlier this month. He said that his son — an infrequent marijuana user — had smoked pot with friends on Thanksgiving.

“It’s not like he’s a smoker for 30 years and (had) deteriorating lungs because of that,” said Mark Hancey, adding that Riley had been drug free for a year before his illness.

Hospital officials told KSL in a statement on April 10 that its medical center did not “transplant organs in patients with active alcohol, tobacco or illicit drug use or dependencies until these issues are addressed, as these substances are contraindicated for a transplant.” Medical and recreational use of marijuana remains illegal in Utah.

“This case has touched everyone who was involved in it, and we would like to express our sincere condolences to the Hancey family,” Suzanne Winchester, a spokeswoman for University of Utah Health, which oversees the medical center there, told Vocativ in a statement on Monday. “We were extremely saddened to learn of Riley’s passing, and we send our deepest sympathies to his family and friends during this difficult time.

With Riley Hancey’s life hanging in the balance, his family frantically searched around the country for a hospital that would perform the procedure. Doctors at the University of Pennsylvania ultimately agreed and Hancey received a double lung transplant on March 29 — more than four months after he first became ill.

On April 18, Hancey’s birthday, his family posted a message on a crowdfunding page set up to offset the cost of his transplant. “Please keep sending happy, healthy and positive thoughts and prayers his way, the message read. “He needs all the love and good energy he can get!”

He died four days later.