California-based drugmaker, Gilead Sciences Inc., agreed to allow four of its AIDS drugs to be made by generic drug companies at a cheaper cost in return for a small percentage of royalties, United Nations health officials said Tuesday.

Roughly 33 million people worldwide have HIV, the virus that causes AIDS, and live in Africa and Asia where medicines to treat the virus must be affordable in order for those who have little funds to buy the drugs. One of the four drugs will also be used to treat people with hepatitis.

The 'first of its kind' deal was negotiated by the U.N.-led Medicines Patent Pool, a partnership that raises money for AIDS, tuberculosis and malaria. We will continue to work with Gilead and others to expand access to all people living with HIV in developing countries, Ellen 't Hoen, executive director of the pool, told ABC News.

Gilead will receive from three to five percent royalties on its four drugs, which will be supplied to about 100 countries. Until now, its drugs have been mainly sold in rich countries, and profits from the new deal are expected to be a tiny fraction of those Gilead normally receives from the Western consumers.

This agreement is an improvement over what other big pharma companies are doing to ensure access to their patented AIDS medicines in developing countries, Michelle Childs, a director at Doctors Without Border's campaign for access to essential medicines, added. Still, she warned caution was necessary and that the new deal should not become the template for future agreements.

Patients in poorer countries often have to wait a number of years until the patents expire on new drugs and can be made more cheaply by generic companies. However, critics questioned whether the deal went far enough as the deal excluded manufacturers in Thailand and Brazil - large producers of generic drugs.