A Liberal senator has crossed the floor to help seal parliamentary approval of a plan to stop charging asylum seekers and immigration detainees for their mandatory detention.

Judith Troeth rose from her seat for the vote this afternoon and walked across the chamber, in defiance of her party's stance on the issue.

The vote went Labor's way 34 to 30.

Before the vote, Senator Troeth spoke strongly in favour of better treatment for refugees and asylum seekers, saying existing laws had to be changed.

"No advanced society should have on its books laws like this and so I will be supporting the Government on this bill," she told the Senate.