By Anthony Boadle

BRASILIA (Reuters) - Conservative legislators in Brazil say they will back interim President Michel Temer through a growing corruption scandal in return for support for their right-wing social agenda, including tougher abortion restrictions and looser gun control.

The powerful bloc's willingness to stand by Temer, expressed to Reuters by five of its leading lawmakers, bolsters his chances of surviving the scandal and ousting suspended President Dilma Rousseff in an impeachment trial, despite losing three ministers in a month to a graft probe of state oil company Petrobras <PETR4.SA>.

The widening scandal has undermined Temer's six-week-old government and shaken confidence in his ability to pass reforms aimed at cutting Brazil's fiscal deficit as Latin America's largest economy faces its worst recession in decades.

Temer, the former vice president, took office last month after the left-leaning Rousseff was placed on trial in the Senate for breaking budget rules. He will see out her term until 2018 if she is convicted in the impeachment hearings, due to conclude in mid-August.

Leaders of the so-called "Bible, beef and bullets" caucus -- which groups evangelical Christians, the farm lobby and lawmakers determined to ease strict firearms controls -- are keen to see Rousseff dismissed from office after she threatened to veto its social and business agenda.

Temer has denied allegations that he sought campaign funds for his party stemming from the Petrobras graft scheme.

"The corruption allegations will not stop us supporting Temer's economic plan," said Senator Magno Malta, an evangelical pastor who rose to fame as singer in a gospel band and who is a prominent member of the lobby.

"Temer is a Christian, who believes in family values and that God meant marriage to be between a man and a woman. Our agenda will move forward now."

Brazilian politics shifted to the right at the 2014 elections, when the farm lobby backed by the booming agribusiness sector bagged 42 percent of the seats in the lower house and one quarter of the Senate.

Evangelical Christian lawmakers won a further 76 of the 513 seats in the lower house, with financial backing from fast-growing Pentecostal churches.

Combined with Temer's pro-business agenda, the coalition's strong hold on the legislature marks an abrupt shift to the right after 13 years of leftist Workers Party rule.

The ideological alliance is made up of lawmakers across the party spectrum but usually votes as a bloc on social issues and on many economic ones. Its influence is amplified by the relatively weak party loyalties in Brazil's Congress.

The farm lobby and evangelical caucus had backed the previous government in a bid to advance their proposals, even though they were ideologically poles apart. But under the Workers Party they were not strong enough to set the agenda.

Now they want to seize the opportunity to restrict gay rights and abortion, lower the age of criminal responsibility and advance farmers' interests in conflicts with Indian tribes.

In return, lawmakers from the bloc told Reuters they will work to ensure passage of measures to plug a fiscal deficit that topped 10 percent of economic output last year, as well as unpopular pension and labor reforms.

Antonio Queiroz, an analyst with Brazil's Congressional research service, said conservative lawmakers were emboldened by the prospect of Rousseff's removal.

"She would have vetoed anything that prohibited the union of same sex people or restricted the sexual and reproductive rights of women," he said. "The Temer government does not have any ideological problem with these proposals so the center-right will push for them far more actively."

FAMILY CODE

A spokesman for Temer's government said it supported some items of the agenda and not others, but declined to provide specifics. "The issues have to be debated by Brazilian society and voted in Congress," Marcio de Freitas said.

Top of the evangelical agenda is the Family Statute to ban same-sex marriages, which have been allowed by Brazil's Supreme Court but have not yet enshrined in the Civil Code. The bill is due to be voted in the second half of the year.

Evangelical lawmakers also want to restrict abortion even in cases of rape, which is allowed by the current law in the majority Roman Catholic country.

"We hope Brazilian society will make itself heard to stop this," Jean Wyllys, a gay congressman from Rio de Janeiro, told Reuters. "This is the most conservative Congress since the military dictatorship ended in 1985 and Temer's government depends on that majority."

Temer's appointment of billionaire Blairo Maggi as agriculture minister -- the so-called King of Soy whose family business is the world's largest soybean producer -- was seen as an overture to the powerful farm lobby.

Brazil is one the world's top food exporters and agribusiness remains the main motor driving the economy during the recession.

The farm lobby's leader in Congress, Luiz Carlos Heinze, said he was not concerned by the corruption scandal and was focused on seeking an easing of restrictions on foreign investors buying farm land, improvements to export infrastructure, and the resolution of disputes with Indian tribes fighting land cultivation in the Amazon.

"If cabinet members are found guilty they have to go. Three have fallen and more could follow. That's not a problem. Temer will still have our support because Brazil was adrift and he has set the economy on a new course," Heinz told Reuters.

Farm state lawmakers also support a bill relaxing gun control rules that is being pushed through by lawmakers backed by Brazil's firearms industry, a lobby that advocates the right to own weapons.

A bill that passed committee last year would undo key parts of Brazil's 2003 Disarmament Law, which was hailed by human rights groups as a key step toward containing crime and armed robbery in cities.

"We want to restore the right of good citizens to defend their lives, their families and their property, since an inefficient state has failed to do this," said the bill's sponsor, Laudivio Carvalho. He said the bill will be presented for a floor vote once Rousseff's ouster was confirmed.

(Reporting by Anthony Boadle; Editing by Daniel Flynn and Stuart Grudgings)