The Archbishop of Wales says the death of a Ghanaian woman removed from the UK while being treated for cancer will be on Britain's conscience.
Ama Sumani, 39, died two months after being removed from the UK
Barry Morgan said a "civilised, wealthy society" had turned "a sick woman out of her bed and put her on a plane".
Ama Sumani, 39, was removed from a Cardiff hospital in January after her visa expired. She has died in Ghana.
The Archbishop of Canterbury, Dr Rowan Williams, also said questions had to be answered about Ms Sumani's removal.
The Home Office said the case had been carefully considered through the independent judicial process.
Friends of Ms Sumani, a widow, have vowed to use funds raised in an attempt to ensure her two children get a proper education.
Her death in Accra came hours after she had been told doctors in the UK and South Africa had been found to treat her.
More than £70,000 had also been raised towards drugs unavailable in the 39-year-old's home country.
Dr Morgan said he was "enormously sad" to hear the news.
He said: "I believe her death is on the conscience of this nation because we deported her when it was against every humanitarian instinct to do so.
"My thoughts and prayers are with her family."
Following Ms Sumani's removal from the University Hospital of Wales, Church of Wales bishops said it had breached her human rights.
Dr Morgan said flexibility was needed in immigration cases, adding: "We need to exercise compassion and understanding and act appropriately for each case.
"It is never appropriate for a civilised, wealthy society to turn, literally, a sick woman out of her bed and put her on a plane to a very worrying future.
"What sort of moral example does that send to the rest of the world?"
The Archbishop of Canterbury, Dr Rowan Williams, added: "I am very sorry to hear that Ama Sumani has died.
"There are underlying questions about the justice or reasonableness of her deportation that need an answer."
Ms Sumani's friend Janet Symmons, from Cardiff, saw her last Saturday when she had asked whether she was taking her back with her.
She had explained that Ms Sumani had not sent her the power of attorney needed but now that was in place, she planned to return to sort things out.
Mrs Symmons added: "She refused to talk to me after that. All she said is 'it will take too long'."
A South African hospital were sending a breakdown of costs and a UK doctor willing to treat Ms Sumani had been found, said Mrs Symmons.
She added: "So when everything was coming together and suddenly she just said she was too tired."
Some of the funds raised for Ms Sumani would go towards a decent burial, she said.
She added: "The rest, I will try and make sure that her children get a proper education because that was the last thing she said to her brother that Aunty Janet and her friends will look after the children for me because we did promise her."
Lin Homer, chief executive of the Border and Immigration Agency, said: "This is a sad case, and all of us feel sympathy for her family at this time.
"The circumstances surrounding this case were not unique though.
"The case was carefully considered by trained caseworkers but also through the independent judicial process, which is better and fairer than a decision by me as chief executive or by the minister."
Ms Sumani moved to the UK five years ago to become a student but began working in contravention of her visa regulations.
Diagnosed with malignant myeloma, she had been undergoing dialysis and receiving other drugs in Cardiff.