India's five-month-old governing coalition received a major boost Saturday when the ruling Congress Party won a solid victory over Hindu nationalist parties in a state election that had been widely seen as a test of the new government's staying power.

Congress and its allies won 139 of 288 seats in the legislature of Maharashtra, India's wealthiest and second-most-populous state of almost 100 million. The Hindu nationalist coalition led by the Bharatiya Janata Party, or BJP, won 118 seats, according to preliminary results of Wednesday's election that were announced Saturday.

Another 31 seats were claimed by smaller parties and independents, some of which will join the Congress-led coalition to form a new government, analysts said.

The outcome was an important victory for the Congress Party, for the government of Prime Minister Manmohan Singh and especially for Sonia Gandhi, who renounced her claim to the prime minister's job after general elections in May but continues to lead the Congress Party. Gandhi, the Italian-born widow of former prime minister Rajiv Gandhi, campaigned heavily in Maharashtra before the elections.

Although a Congress-led government has been in power in the state for five years, anti-incumbency feelings run high in India, and many analysts and polls had predicted a far more competitive contest in Maharashtra. The BJP, still smarting from its unexpected defeat in May, had looked at the state election as a critical opportunity to reestablish the Hindu nationalist party as a force to be reckoned with on the national level.

Singh and Gandhi, meanwhile, had hoped that a strong performance by Congress would strengthen Singh's hand in negotiations with troublesome communist allies who have fought his efforts to speed up the pace of privatization and remove obstacles to foreign investment.

"This enormously strengthens Sonia Gandhi," said Mahesh Rangarajan, a New Delhi political analyst. "She has delivered a state which has not voted back any ruling government for the last 10 years." By the same token, he added, "It's a very serious defeat for the BJP. They failed to win an endorsement of their performance nationally."

Apart from the number of seats won, Rangarajan said it was striking that Congress and its allies won 40 percent of the overall vote, compared with 32 percent for the BJP. The BJP and its Hindu nationalist ally, the regional Shiv Sena party, enjoy strong support in the state capital of Bombay, India's industrial and financial center. The incumbent government, moreover, has been widely criticized for poor governance and corruption, and the state's finances are a mess.

But the opposition coalition proved unable to capitalize on the government's shortcomings, in part, analysts said, because of the prominent campaign role played by Gandhi, whose stature has grown since her decision to decline the prime minister's job. The Maharashtra outcome will add to that stature, and with it, the challenge faced by the BJP, which earlier this year looked all but invincible. Other states that will hold elections during the next two years are even less hospitable to the party, analysts said.