A couple who turned their backs on Islam after moving to Australia have declared how lucky they are to have escaped Pakistan.

Comedian Sami Shah and his wife Ishma Alvi arrived in the small Western Australian town of Northam, north-east of Perth, in 2012 with their young daughter Anya.

Ms Alvi, a psychologist, was able to bring the family to Australia on a skilled migration visa to leave behind a country which executes people for blasphemy and disbelieving in God.

Scroll down for video

Ishma Alvi (left) and her husband Sami Shah (right) moved to Australia from Pakistan with their daughter Anya in 2012

Ishma Alvi (left) and Sami Shah (right) both left Islam after arriving in Australia from Pakistan

In an upcoming episode of Australian Story, she tells of counselling Pakistani refugees at a local detention centre.

'It was just a stroke of luck, luck of birth, that they were sitting in the chair across from me and not the other way around,' she told the ABC program airing on Monday.

Her husband, who was a television producer and satirist in Pakistan, struggled with being unemployed in their new adopted country.

However Shah was soon making regular trips to Perth to perform stand-up comedy and before too long, he became a big name at international comedy festivals across Australia.

Ishma Alvi (pictured with her daughter Anya) told the ABC about helping Pakistani refugees

He has since written a book about how they became ex-Muslims, The Islamic Republic of Australia.

Shah and Ms Alvi, who became Australian citizens in January and now live in Melbourne, said violent fundamentalism and anti-women attitudes turned them off the religion they were raised under.

The couple also explained the reasons for their transition by citing passages from the Koran, which Mr Shah has described as 'maddening as a text'.

In their native Pakistan, blasphemy and atheism are punishable by death.

Sami Shah is now an atheist in Australia but in Pakistan, blasphemy is a capital offence

Sami Shah is now a Melbourne-based comedian who condemns sexism in the Koranic verses

However, Shah is now living openly as an atheist.

Growing up in Pakistan, he found himself questioning Islam, angered by fundamentalist violence.

'What stood out for me wasn't just the mass murder and carnage initiated by the extremists but also their religious justification for it,' he said in his book.

'The religion I had been told my entire life was a religion of peace - an argument I myself had propagated when ­confronted with Islam's critics while studying in America - was ­comfortably being used as a ­religion of war.'

Ms Alvi said she came to regard Islam as an anti-women faith when she was 17.

Australian Story airs on ABC television on Monday at 8pm