Australian Senator Lee Rhiannon has been released from the custody of Sri Lankan government officials and allowed to leave the country.

She was not charged, neither formally deported, though the Sri Lankan government maintains she and the New Zealand MP Jan Logie broke visa laws, a charge Ms Rhiannon denies.

Detained in Sri Lanka: Greens Senator Lee Rhiannon. Credit:Katherine Griffiths

"They did not require a statement from us, and we were given back our passports after about three hours in detention," she told Fairfax Media by phone as she drove to Colombo airport.

"The only condition they put on us was that we were not allowed to talk to the media without approval from [Sri Lanka's] external affairs department."