Accepting "the collective judgement of the people," Indian Prime Minister Indira Gandhi resigned today as the parties that opposed her in the general election expanded their control of parliament with new victories.

Gandhi said that she accepted the election verdict "unreservedly and in a spirit of humility." Her son, Sanjay, also defeated at the polls, said he was quitting politics.

Acknowledging that his own activities as a close adviser to his mother may have contributed to her defeat, Sanjay Gandhi, 30, said, "I am all the more sorry if what I did in my personal capacity has recoiled on my mother, whose life bas been spent in selfless serice."

As the Gandhis were publicly acknowledgding their electoral debacle, one of their bitterest foes was being released from prison, a beneficiary of the opposition victory and the end to the 21-month national emergency.

Socialist leader George Fernandes and 21 other people charged with attempting to overthrow Gandhi's government by force were released on bail today.

Fernandes won a seat in Parliament as a People's Party candidate in Bihar state by nearly 300,000 votes even though the government refused to release him so that he might campaign.

With only a few seats remaining to be declared in the 542-seat Parliament, the People's Party, an amalgam of four non-Communist parties formed only two months ago, moved into an absolute majority with 273 seats.

With their allies from Jagjivan Ram's Congress for Democracy and other parties and independents, the opposition claimed it had mustered enough seats to hold a two-thirds majority in Parliament, sufficient to overturn controversial changes in the constitution passed by the Congress Party during the emergency.

The Congress Party which held two-thirds of the seats in the outgoing Parliament, had mustered only 147 as of today.

A decision on the shape of the new government is expected by Thursday and Gandhi and her outgoing Cabinet were asked by Acting President B. D. Jatti to continue as a caretaker government until the new Cabinet is chosen.

The 59-year-old Indian leader stepped down after 11 years and two months in power.

"Elections are part of the democratic process to which we are deeply committed," her statement said. "I have always said, and I do believe, that the winning or losing of an election is less important than the strengthening of our country and insuring a better life for our people."

She pledged her own and the Congress Party's cooperation with the new government. Her statement concluded:

"My love and convern for the welmain unchanged. Since childhood, my aim has been to serve the people to the limit of my endurance. This I shall continue to do."