The government has apologised for the infected blood scandal at the public inquiry into how thousands of people became infected with HIV and hepatitis.
The government's legal team said it was clear "things happened that should not have happened".
The inquiry, which started on Monday, is looking at how NHS patients were given infected blood products during the 1970s and 1980s.
It has been called the worst-ever NHS treatment disaster.
Speaking on behalf of the Department for Health and Social Care in England and its predecessor which covered the whole of the UK, Eleanor Grey QC said: "We are sorry. This happened when it should not have done."
She said the infections had had a "devastating" impact on individuals and their families, adding the government wanted to express "sorrow and regret" at the start of the inquiry.
'I lost everything'
Earlier in the week the inquiry heard emotional testimonies from people infected with HIV and hepatitis.
In a video played to the inquiry, one man described how he felt he lost his entire life after finding out at the age of 43 that he had been infected with hepatitis C when he was a child.
He was given an injection of blood products when he was eight for a swollen knee that was misdiagnosed as haemophilia.
"I lost everything. I lost my whole life the day I found out - everything ended," he explained.
With her identity hidden, one woman said she became infected with HIV through her husband who was a haemophiliac, and who had been given contaminated blood.
She said when they found out they were left stunned and devastated.
"This was the mid-1980s and the climate of fear, discrimination and stigma associated with HIV and Aids was horrendous," she added.
"We coped the best we could. We were silenced, and we kept quiet."
Another victim, a widow, whose husband John died of Aids in 1994 and who also had hepatitis C, said: "I feel we have been treated very badly. Nobody has listened to us over the years."
Blood sold by prison inmates
There have been previous inquiries into the scandal, but this is the first UK-wide public inquiry that can compel witnesses to testify.
It comes after decades of campaigning by victims, who claim the risks were never explained and the scandal was subsequently covered up.
About 5,000 people with haemophilia and other bleeding disorders are believed to have been infected with HIV and hepatitis viruses over a period of more than 20 years - about 2,500 of them have since died.
They were injected with blood products used to help their blood clot.
But because the UK was struggling to keep up with demand for the treatment, it had begun to import supplies from the US.
Some of the human blood plasma used to make the product came from donors such as prison inmates, who sold their blood.
People who underwent blood transfusions were also exposed to the contaminated blood - as many as 30,000 people may have been infected.
By the mid-1980s the products started to be heat-treated to kill the viruses and by the late 1990s synthetic treatments for haemophilia became available, removing the infection risk.
The inquiry is expected to last over two years.