Image copyright Getty Images Image caption Indonesia descended into violence in 1965 after an abortive communist coup

The Indonesian authorities have forced the organisers of the country's main literary festival to cancel events linked to mass killings 50 years ago.

Officials were threatening to call off the entire Ubud Readers and Writers Festival, due to start in Bali next week, if the organisers did not comply.

At least 500,000 people were killed across Indonesia after an attempted communist coup in 1965.

Cancelled events included panel discussions on the massacres.

"The events related to 1965 were flagged by the authorities as something that could potentially cause our operating license to be revoked," an unnamed festival spokesperson told Reuters news agency.

General Suharto and the military took power following the 1965 coup attempt, as Indonesia descended into one of the worst massacres of the 20th Century.

Indonesia's darkest hour

The Communist Party then had three million members. Suspected members and sympathisers were hunted down, tortured and killed.

The events form the backdrop of the 1982 film The Year of Living Dangerously, starring Mel Gibson.

President Joko Widodo - who was elected last year - has promised a state-sponsored inquiry, but correspondents say so far little has been done.

International human rights groups have urged Indonesia to provide justice to victims' families.

What happened in 1965?

Rivalries between the Indonesian military and the Communist Party came to a head when six generals were killed in an overnight attack by soldiers allegedly sympathetic to the communists.

A group of officers led by a colonel in President Sukarno's palace guard was accused of trying to launch a coup.

General Suharto led bloody anti-communist purges in which hundreds of thousands of suspected leftists were killed.

Many more were detained and imprisoned without trial.

In 1966, President Sukarno was forced to hand emergency powers to Gen Suharto, who took over as president the following year, ruling Indonesia for 31 years

More from the BBC's Witness programme