Peter Erlinder has been representing Rwandan opposition politician Victoire Ingabire, who is also accused by the government of Paul Kagame of revisionism concerning the Rwandan genocide. Photograph: Marc Hofer/AP

A Rwandan judge has turned down a bail application by an American lawyer charged with denying Rwanda's 1994 genocide and publishing articles that threaten the country's security.

Peter Erlinder pleaded not guilty to the charges in court last Friday and asked to be granted bail so he could return home for medical treatment.

Erlinder is accused of violating Rwanda's laws against minimising the genocide in which hundreds of thousands of Rwandans, the vast majority of them ethnic Tutsis, were massacred by extremist Hutus over 100 days. Erlinder does not deny the violence happened but contends it is inaccurate to blame just one side.

"The medical report which Erlinder presented to court only shows that he was hospitalised twice but it does not convince the court that his hospitalisation was a result of detention," Judge Maurice Mbishibishi said yesterday.

He said Erlinder will remain in detention for 30 days and can appeal against the bail decision in five days. His lawyers said they would appeal immediately in Rwanda's high court.

Erlinder, who was arrested on 28 May, was taken to hospital last Tuesday after taking dozens of pills in what Rwandan police said was a suicide attempt. But his family has denied this. Erlinder, 62, takes prescription antidepressants and cholesterol-reducing medication.

The foreign affairs minister, Louise Mushikiwabo, said the government would make sure Erlinder gets all the medical attention he needs as well as having full access to his lawyers.

"The prosecution of Peter Erlinder is not a political tactic; it is an act of justice. If critics disagree with the Rwandan laws against the denial or defence of genocide, we invite and welcome that debate," said Mushikiwabo in a statement.

Erlinder arrived in Rwanda two weeks ago to help with the legal defence of opposition leader Victoire Ingabire and was arrested a few days later. Ingabire, a Hutu, wants to stand for president in the 9 August elections, challenging the incumbent president, Paul Kagame, a Tutsi. But she was arrested in April and charged with promoting genocide ideology.

The US lawyer, a professor at William Mitchell College of Law in St Paul, Minnesota, has a reputation for taking on difficult, often unpopular defendants and causes. Erlinder leads a group of defence lawyers at the UN's international criminal tribunal for Rwanda, which is trying the alleged leaders of the 1994 genocide.