An asylum seeker who was close to death from a hunger strike lasting more than 40 days is improving after he accepted medical assistance.

Iranian Saeed Hassanloo, 25, was admitted to Royal Perth Hospital last month, and it is understood his protest began after learning his refugee case had been rejected.

Immigration Minister Peter Dutton said this morning the asylum seeker's condition had improved.

"I'm advised overnight that Saeed has accepted medical assistance and is on some path to recovery," Mr Dutton told Radio National Breakfast.

"Obviously he's got a long way to go but the advice that I have is that he has decided to take fluids or food and he's speaking to his case manager and his medical team."

Mr Dutton said while he was pleased Mr Hassanloo's condition had improved, the asylum seeker's actions would not change his circumstances.

"If I was to succumb to that pressure, the strong advice from my department is that I would have hundreds if not thousands of people on hunger strikes tomorrow," Mr Dutton said.

A spokesman for the Refugee Action Coalition, Ian Rintoul, said there were up to 40 Iranian asylum seekers in indefinite detention and Mr Dutton should release them into the community.

"Peter Dutton has pushed Saeed to the brink as he has pushed other people to the brink," Mr Rintoul said.

"They have been held in indefinite detention even though the minister knows he cannot return them to Iran, and it's now beholden on Peter Dutton to do the sensible thing and release those people on bridging visas."

Refugee advocate Victoria Martin-Iverson told the ABC that Mr Hassanloo yesterday thanked advocates and supporters for their prayers, messages and flowers, and agreed to go off his hunger strike and accept medical intervention.

Mr Hassanloo has been fighting for a visa to stay in Australia since he fled Iran in 2009.

He has been held in detention for the past four-and-a-half years, first in a community detention centre in Melbourne and then at Yongah Hill.