(Adds comment from lawmaker and economist, details of monetary policy and currency drop)
By Silvio Cascione and Brad Haynes
BRASILIA/SAO PAULO, Dec 1 (Reuters) - Brazil's economy shrank 1.7 percent in the third quarter, deepening its sharpest recession in 25 years and stoking opposition to President Dilma Rousseff as she struggles to close a growing fiscal deficit and contain a vast corruption scandal.
The quarterly contraction, reported by government statistics agency IBGE on Tuesday, was bigger than the median forecast of 1.2 percent in a Reuters poll of 33 analysts.
Brazil's commodity-fueled boom has crashed spectacularly since Rousseff took office in 2011, forcing her to abandon stimulus efforts this year as she seeks to rescue the federal budget.
The president's unpopular austerity package has foundered in Congress, however, and the recession is shrinking tax revenue faster than she can trim spending, eroding her credibility and leading Standard & Poor's to cut Brazil's credit rating to junk.
"There is still no light at the end of the tunnel," said Luciano Rostagno, chief strategist at Banco Mizuho in Sao Paulo. "In the best case scenario, there will be some turnaround in the second quarter of 2016. ... But the risk is that we'll keep this recessionary outlook for longer."
On an annual basis, Brazil's $1.5 trillion economy dropped 4.5 percent in the third quarter, the steepest decline since the current data series began in 1996.
Investment fell 15.0 percent from a year earlier, declining for the ninth consecutive quarter, as political disarray and a sweeping graft investigation battered business confidence.
Output from the services and industrial sectors also fell sequentially for the fourth and sixth straight quarters, the longest slumps on record.
Financial markets expected the poor growth data after months of grim indicators. Brazil's currency, the real, and the benchmark Bovespa stock index seesawed in choppy trade.
Other emerging economies in Latin America and Africa have struggled this year with slumping Chinese demand for their commodities, but none is suffering as dramatically as Brazil, whose political and economic crises have inflamed each other.
Rousseff struggled to pass key fiscal measures this year as the recession pushed her approval rating into single digits and the political mood turned toxic with evidence of a kickback scheme funneling billions of dollars from state-run firms.
The country's biggest corruption investigation ever is rattling the heights of Brazilian business and politics, slowing public works by companies under investigation and tangling budget negotiations in the capital Brasilia.
Last week, the Supreme Court ordered the arrest of the country's most famous dealmaker, banker André Esteves, and the ruling coalition's leader in the Senate, Delcídio do Amaral, on suspicion of obstructing the probe. That brought Congress to a halt.
With the president's coalition in disarray, lawmakers have revolted against proposals for new taxes and spending cuts, forcing her to slash fiscal targets repeatedly and cancel a trip to Japan to stay within federal budget rules.
A growing chorus in the opposition say Rousseff's disregard for those rules in recent years is grounds for impeachment, a motion that the speaker of the lower house, who is also the target of a graft probe, said he would decide on this week.
"If the Worker's Party stays in power, it will take us decades to recover what is being lost," opposition Senator Ronaldo Caiado tweeted about the latest data.
The finance ministry said in a statement that the third-quarter data "point to a more extended adjustment of the Brazilian economy, due largely to factors beyond the impact of fiscal rebalancing ... stemming from persistent uncertainty."
The cloud of political uncertainty has sapped business and consumer confidence, which remain stuck near record lows.
An industrial survey also released on Monday showed Brazil's manufacturing slump accelerated in November to its fastest pace in six years as factories sped up job cuts.
The economy has shed more than 1.4 million formal jobs in the past year, causing the most unemployment since the 2009 global financial crisis. Tuesday's GDP data showed household consumption fell 4.5 percent from a year earlier due to lost jobs, tighter credit and annual inflation running near 10 percent.
Pressured by a tumbling currency and regulated price increases, accelerating inflation is likely to force Brazil's central bank to raise interest rates again from a nine-year high in January, according to traders.
Tightening monetary and fiscal policy in the depths of the downturn has forced many banks to slash their growth forecasts.
"The combination of recent recessionary measures have had the net effect of a very serious economic downturn. ... I'm very concerned about the violent drop in the investment rate," warned André Perfeito, chief economist at Gradual Investimentos, who called Tuesday's economic report "an obituary."
The data set off another round of downward revisions on Tuesday, with Banco Fibra projecting a 3.8 percent contraction in 2015 and a 3.1 percent drop next year.
One of the few remaining hopes for Brazil's economy was that exports would rebound after the currency tumbled 31 percent this year. But exports fell 1.8 percent from the second quarter due to uncompetitive factories, weak demand from regional trade partners and soft commodity prices.
"Despite the exchange rate adjustment, we are not seeing the results we hoped for. The hypothesis of the central bank, that the currency will help us, requires a little more caution," said the economist Perfeito. (Reporting by Silvio Cascione and Brad Haynes; Additional reporting by Camila Moreira and Bruno Federowski in Sao Paulo; Editing by Catherine Evans, Chizu Nomiyama and Richard Chang)