Western Australia has signed a long-awaited funding agreement to secure a lifesaving service for Indigenous people taken into police custody.

The deal will provide almost $1m in annual funding for the Aboriginal Legal Service of WA to establish and operate a custody notification service, which will ensure that it is notified as soon as possible when an Aboriginal or Torres Strait Islander person is detained, even if not charged.

The establishment of a mandatory, independent notification service was recommended by the royal commission into Aboriginal deaths in custody more than 27 years ago. Two years ago, a coroner recommended that WA introduce the program, following the inquest into the death of 22-year-old Yamatji woman Ms Dhu.

“It has been a long time coming,” the ALSWA chief executive, Dennis Eggington, told Guardian Australia.

Ms Dhu died after falling gravely ill in a police lock-up in Port Hedland on 4 August, 2014. She was one of five Aboriginal people to have died after being held in a police watchhouse in WA since 2008, a Guardian Australia investigation found. More than 147 Indigenous people have died in custody in the past 10 years, and more than 407 since the royal commission in 1991.

Ms Dhu’s grandmother, Carol Roe, said she hoped the notification system would prevent others from dying in similar circumstances.

“I really pray for that, I really do pray that they will get better treatment than my granddaughter got,” Roe said. “If this service was in place [in 2014], she might be here today.”

Friday’s announcement followed more than two years of negotiations. The final deal to provide $750,000 in annual federal funding and $202,000 a year from the state was signed late on Thursday.

The funding will allow ALSWA to employ five dedicated lawyers and two support staff to cover the phone line 24 hours a day, seven days a week.

The WA attorney general, John Quigley, said the service would begin as soon as ALSWA had recruited and trained the necessary staff, which was likely to be in the first half of 2019.

Once the regulations are in place, police officers will have a mandatory obligation to contact the service when an Indigenous person is brought into police custody for any reason, including protective custody.

The federal Indigenous affairs minister, Nigel Scullion, struck a similar funding arrangement with the North Australian Aboriginal Justice Agency on Wednesday, offering $750,000 a year for three years on the condition that the Northern Territory government agree in legislation to extend the service to people in protective custody.

Scullion said the service, which has been in operation in New South Wales and the Australian Capital Territory since 2000, had been proven to “save lives”.

“The Coalition government has been advocating for the CNS because it ensures access to fundamental legal rights, no matter if a person is taken into police custody in a metropolitan, rural or remote location,” he said. “This includes persons who are not charged with an offence.”

Eggington said it would take some time for the mandatory reporting obligation to change the attitudes of police in WA, but he believed the police commissioner, Chris Dawson, was genuine about achieving institutional cultural change.

“It will take some time for that leadership to filter down to all the troops ... but I do believe he is genuine and if he is there long enough, we will see some real cultural change in the police in WA,” he said.

Negotiations with Queensland and South Australia are continuing.