The leaders of both of Australia's major political parties have agreed that gays don't go to hell because of their sexual orientation, as Christian beliefs have risen to extraordinary prominence in the final days of an election campaign.

Prime Minister Scott Morrison opposed gay marriage while opposition leader Bill Shorten argued for marriage equality ahead of a national vote in 2017 that led to Australia legally recognizing same-sex unions.

Morrison accused Shorten on Tuesday of a "desperate, cheap shot" ahead of elections on Saturday by challenging the prime minister to say whether he believes gays went to hell.

Morrison said he did not believe gays went to hell, after failing to directly answer the same question from a journalist a day earlier.