Thousands of cancer patients in Uganda will be left untreated for months after the nation's only radiotherapy machine broke down, triggering public criticism about underfunding in the health system weeks after the president's re-election.

The device, bought in 1995 and sited at the main Mulago referral hospital, stopped working early in April, Christine Namulindwa, the cancer unit spokeswoman told Reuters.

A new machine was bought in 2013 but the government delayed allocating 30 billion shillings ($8.97 million) for a special building, called a bunker, to house it, she said.

About three quarters of the 44,000 new cancer patients seen last year needed treatment, Namulindwa said. "In the next six months, we expect ... the new radiotherapy machine to be installed."

Members of the public and activists took to social media saying the government was neglecting health care - accusations that it rejects.

"The cruel indifference by government to the health needs of Ugandans is astonishing," said Asia Russell, Uganda-based executive director of Health GAP, a public health pressure group.

Government critics say public healthcare has been neglected under President Yoweri Museveni, 71, a former rebel who took power in 1986. They accuse his government of focusing funds on the army and bloated civil service.

The government dismisses such charges. Officials point to the transformation of Uganda under Museveni who restored order and delivered economic growth to a nation that had been plunged into chaos under successive dictators before he seized power.

Junior Health Minister Chris Baryomunsi told parliament that some patients would be airlifted to Nairobi for treatment, Ugandan newspapers reported on Friday. Officials could not immediately be reached for comment.

Deputy government spokesman Shaban Bantariza dismissed accusations that the government was more concerned with a winning re-election than dealing with the sick.

"We have many priority areas as a government yet funds are not enough. No one has diverted any money," he said.

Last year, there was a shortage of anti-HIV drugs, leaving an estimated 240,000 patients on publicly funded HIV treatment at risk. Health activists at the time blamed a shortage of cash to buy them the drugs because of political campaigning, a charge the government denied.

($1 = 3,343.0000 Ugandan shillings)

(Writing by Elias Biryabarema; Editing by Edmund Blair and Andrew Heavens)