Scott McIntyre, a former sports reporter for Australia’s SBS network, has been given a suspended prison sentence in Tokyo after being found guilty of trespassing during an attempt to locate his children, whom he has not seen for eight months.

The Australian freelance journalist, who is based in the Japanese capital, was arrested in late November, a month after allegedly gaining unauthorised access to the common area of the apartment building where his parents-in-law live.

The Tokyo district court on Wednesday sentenced him to six months in prison, suspended for three years.

“This penalty should not be taken lightly,” said the presiding judge, Yuichi Tada, in explaining the suspended sentence. “However, the area [McIntyre gained access to] was a common area and he did not use force. He has no criminal record and promised this court that he would not do it again.”

McIntyre, 45, was initially held at a police station in Tokyo before being transferred to the city’s main detention centre in Kosuge, which last year was home to the former Nissan boss and international fugitive Carlos Ghosn.

McIntyre said he had shared a tiny cell, which was lit day and night, with a convicted murderer who was appealing against his sentence. Conditions there had almost driven him “insane”, he told the Guardian during an interview at the detention centre earlier this month.

McIntyre, who was led into his court hearing last week in handcuffs and with a rope tied around his waist, apologised for his actions, claiming he had only wanted to ensure that his son and daughter, aged eight and 11, were safe after large parts of Japan were pummelled by Typhoon Hagibis in mid-October last year.

His parents, who flew to Japan from their home near Sydney to attend their son’s trial, said they were relieved that he had finally been freed.

“We’re glad that it’s over,” McIntyre’s mother, Lynne, said. “But we don’t have our missing grandchildren back, and now we may never get them back.”

McIntyre claimed in court that his wife – with whom he has started divorce proceedings – had abducted their children in May last year and severed all contact with him. The Guardian has contacted McIntyre’s wife for comment.

“I have made repeated attempts [to find them] through the family court and the police but I have had no success,” he said at his hearing. “I have no idea where my children are. I have no idea if they are alive or dead. As a parent this causes me unbelievable grief.”

McIntyre is one of a number of foreign parents who say they have been denied access to their children after separating from or divorcing their Japanese spouses.

The Hague convention on international child abductions, which Japan ratified in 2013 after years of pressure, requires parents accused of abducting their children to return them to their country of habitual residence.

But the treaty does not apply to cases involving couples living in Japan, even if one of the parents is a foreign national, and Japanese courts almost always award custody to the mother.

“All I and other parents want is for Japan to join the civilised world and institute a system of joint custody,” McIntyre said outside the court after the ruling. “I am here on behalf of all those abducted children who don’t have a voice. This is not a way for a modern society to operate. Children deserve two parents.”

McIntyre made headlines in his native Australia in 2015 after SBS sacked him for posting controversial Anzac Day tweets critical of what he called the “cultification [sic] of an imperialist invasion”.