The Senate has passed a bill that would remove all children from onshore immigration detention.

The bill to clear kids from onshore detention centres passed with the support of the Greens, Labor and crossbenchers.

It includes provisions for greater media access to detention centres, something Immigration Minister Peter Dutton is expected to officially refuse.

The amended Migration and Maritime Powers Amendment Bill (No.1) now heads for a vote in the House of Representatives, where the government majority will most likely not treat it kindly.

But Greens Senator Hanson-Young says Prime Minister Malcolm Turnbull –who she calls “Modern Malcolm” – will at least be uncomfortable voting it down.

“I suspect this is an issue for Malcolm Turnbull to decide,” she told reporters.

“He either has to vote now to re-detain children, to lock journalists out of detention centre and to gag staff, or he sees the sense... I can't imagine Malcolm Turnbull feeling very comfortable about voting in the house to re-detain kids.”

The Greens put forward a number of amendments, including one calling for the “separation of people seeking asylum from criminals in immigration detention”, which was voted down.

A number of the Greens additions did make it through, including some relating to mandatory reporting of abuse witnessed within detention centres, and a reduction of secrecy provisions under Section 42 of the Border Force Act.

Advocates including child welfare agency Save the Children want the Turnbull Government to take the unlikely step of supporting the amended bill, and even to extend it to children in offshore immigration detention as well.

The group was removed from providing education and welfare to detainees on Nauru prior last month.

Save the Children spokesperson Matt Tinkler has issued a statement calling for the bill’s 30-day limit for the detention of children to be extended.

“Our experience working with asylum seekers and refugees on Nauru and Manus Island before that tells us that detaining children for prolonged periods is detrimental to their mental and physical wellbeing,” he said.

“We urge the Turnbull Government to bring on the legislation for debate, and pass the amendments as a matter of urgency.”