Britain's GlaxoSmithKline, which decided last week to retain rather than float off its HIV drugs business, is to collaborate with U.S. scientists in developing a cure for AIDS.

Until recently, many researchers were reluctant to even discuss the possibility of curing the disease caused by HIV, which infects 35 million people worldwide, since the obstacles seemed insurmountable.

But after a 30-year battle to keep HIV at bay with life-time antiretroviral drugs, there is growing optimism that a cure is feasible.

The case of Timothy Brown, the so-called "Berlin patient" whose HIV was eradicated by a complex treatment for leukemia in 2007, marked the first cure and the science has been advancing since then.

GSK is tapping into the latest expertise by creating an HIV Cure center with the University of North Carolina (UNC) at Chapel Hill and establishing a new jointly owned company.

The drugmaker said on Monday it would invest $20 million to help fund the work for an initial five years.

Scientists will study various cure options, including a so-called "shock-and-kill" strategy developed at UNC, which unmasks dormant HIV hiding in white blood cells, so that it can be attacked by a boosted immune system.

It is likely to prove a long haul, however.

"In the next five to 10 years we should gain more knowledge around the various mechanisms that could contribute to a cure and maybe in the next 10 to 20 years we can really bring these modalities together," Zhi Hong, GSK's infectious diseases head, told Reuters.

In the case of the Berlin patient, curing HIV involved a stem cell transplant from a donor with a rare genetic mutation that resists HIV infection.

This complicated approach could never be replicated on a large scale, so researchers are pinning their hopes on simplified systems that may also be able to exploit recent breakthroughs in immune system-boosting drugs for cancer.

"I expect we will have progress in fits and starts, so we need a structure to pursue this work in a rational way over a long period of time," said David Margolis of UNC.

GSK sells HIV medicines through its majority-owned ViiV Healthcare unit, which it had been considering for a stock market listing, until a change of tack on May 6.

Its investment at Chapel Hill is separate from ViiV, although ViiV will play an advisory role.