A refugee who scaled fences at an immigration detention centre and died in the Christmas Island jungle triggered two security alarms during his escape but guards failed to act, an inquest has heard.

Stateless refugee Fazel Chegeni Nejad, 34, survived being repeatedly tortured in Iran but had a history of mental health problems when he died in November 2015.

His body was found lying face down about 50 metres from the detention centre in an area that had already been searched almost two days earlier.

The cause of death was consistent with ligature compression of the neck, the West Australian coroner’s court heard on Monday.

Known most commonly as Fazel Chegeni, the Faili Kurd used a fake passport to travel from Iran to Indonesia, before arriving in Australia by boat in October 2011.

He spent 1,477 days in detention and was transferred between facilities and community based detention.

Counsel assisting the coroner Sergeant Lyle Housiaux said a referral to Royal Darwin hospital for neurological testing in September 2015 was never followed through and Chegeni was transferred days later to North West Point detention centre on Christmas Island, which may have been detrimental.

“[It] may have been contrary to guidelines, which prohibit such transfers when significant medical appointments have been made,” Housiaux said.

Chegeni escaped at 9.15pm on 6 November by climbing an internal fence, accessing a roof, hanging off the gutter to drop down, then getting past a 1.2m wire mesh link fence and a 4.7m external electrified perimeter fence.

He triggered two alarms monitored by Serco staff in the security control room, but no action was taken.

“Due to the lack of training and understanding of control room operations … [staff] on duty at the time failed to interpret the alarms and did not activate escape protocols,” Housiaux said.

Almost two hours later, a headcount revealed Chegeni was missing but it was initially believed he was still somewhere in the facility.

The next morning, the search expanded to the jungle. His body was found the following morning.

Chegeni’s immigration department file of more than 700 pages was leaked to the Guardian in 2015, revealing thatdoctors, psychiatrists and department officials warned on more than a dozen occasions over several years that Chegeni’s mental health was being harmed by his detention, highlighting his history of torture and trauma in Iran, his repeated suicide attempts, and recommending he be released.

The inquest heard on Monday that in December 2011 Chegeni was involved in a fracas with other refugees at Curtin immigration detention centre, but he was released in April 2013 and he lived in the community in Victoria.

While living in the community he spoke about the impacts of long-term and uncertain detention on his mental health.

“Detention had a serious psychological impact,” he said. “Honestly, when they first put us in that cage we said we’d never come out of here again.”

After pleading guilty to the assault on the second day of his trial in Perth, Chegeni was sentenced to six months and one day in prison. He won an appeal and had his sentence overturned in March 2014, but the then immigration minister, Scott Morrison, ruled Chegeni had failed the character test and he was returned to detention.

“He was therefore unlikely to ever be granted a visa to live in Australia,” Housiaux said.

As a member of the Faili Kurdish minority, Chegeni was stateless, and not recognised by Iran or any other country as its citizen. So he faced an indefinite detention without charge or trial in Australia. His mental health deteriorated precipitously in detention without hope of release.

George Newhouse from the National Justice Project is representing Chegeni’s family at the inquest. He said Chegeni was consistently denied appropriate mental healthcare.

“Our government knows that victims of torture should not be locked up like animals, but they ignored the warnings and poor Fazel’s desperate pleas for mental health support.”

Newhouse said Chegeni was a quiet and gentle man, loved by his family and and friends.

“Fazel’s family want to know who will be held accountable for his death.”

The coroner will examine whether an earlier and more thorough search could have prevented Chegeni’s death, as well as the appropriateness of the decision to transfer Chegeni to Christmas Island given his medical history, upcoming appointments, and known high risk of self-harm or suicide.

The coroner will also examine the quality of the mental healthcare provided to Chegeni in detention, particularly in his final days, and the supervision he received.

The inquest is scheduled to run for two weeks.