The pair had fled Saudi Arabia after authorities had discovered their sexuality.

Two gay Saudi journalists who fled the country have been released from the Australian detention centre they’d been held in since arriving in Australia. The release came after a motion passed by the Australian Senate earlier this month, and urging from journalists around the world.

The two journalists, using the pseudonyms Sultan and Nassar, fled Saudi Arabia after Sultan was interrogated by Saudi authorities. The authorities threatened him to stop working with foreign media, and allegedly outed him to his family.

Saudi Arabia is generally considered to have some of the worst LGBTQ rights in the world. People convicted of homosexuality can face the death penalty.

Nassar was released on Friday, but due to a ‘bureaucratic bungle’ Sultan was left in the detention centre over the weekend. However, the pair’s lawyer, Alison Battisson, has now confirmed that both men have been released.

In a tweet, Battisson’s organisation, Human Rights For All, said: “Thank you to everyone who persisted throughout the campaign. Community-led action can make a big impact.”

It added: “There are still LGBT+ people in immigration detention. We need to maintain our advocacy to fight for their right to asylum.”

Speaking to the Star Observer, Sultan said: “Definitely, definitely, definitely the gay community rallied around us in a way that was so endearing and so powerful that I really feel it was the gay community that did this.

“Dozens of people directly addressed the minister, that’s for sure and having Ivan Hinton-Teoh [a human rights activist] on our side was a big, big, big plus.”

Sultan also praised another human rights activist, Peter Greste, who was influential in securing Sultan’s release after the Immigration Minister seemed to go on holiday leave.

Speaking about the pair’s plans since the release, Sultan said: “We’re gonna be out there.

“We want to go to the clubs, we want to see what Australian gay society is like. And we just wanna be able to breathe and feel free and not be scared.”

He added: “The whole Villawood experience, I mean, oh God, it was no fun at all and it really made us jaded towards the Australian government. It made us think, my God, have we made the right decision coming here?

“But really from the bottom of our hearts we have to thank the LGBT community. Just all the love that we saw on Twitter and on Facebook… I mean it really feels like we were adopted and this is our new family.”

Related: World Refugee Day: Why no LGBTQ asylum claimant should be held in immigration detention at all