As rain soaked his gold-braided uniform and dribbled from the fingers of his white-gloved hands, the new military leader of Africa's most populous, and highly coup-prone, nation stood at attention Tuesday through an outdoor ceremony marking 25 years of Nigerian independence.

The winds and rains of the tropical storm that enveloped Lagos, drenching Maj. Gen. Ibrahim Babangida and 25,000 other Nigerians who crowded into a stadium here, were apt symbols of the political and economic forces that have battered this West African country for the past quarter century.

"I hardly need say that the history of our nation in its independent existence has been a checkered one," said Babangida, who in August seized control of the government after orchestrating this West Africa nation's sixth military coup.

Three of Nigeria's eight leaders have been assassinated; civilian governments have twice been ousted for alleged incompetence and corruption. The country was riven in the late 1960s by a 30-month-long civil war. Suddenly rich in the 1970s with oil, many of Nigeria's former leaders have been accused of wasting, misusing and stealing much of the money. Now, with a world oil glut, the country is unable to make payments on a $22 billion foreign debt.

The general who stood impassively in the warm Lagos rain promised in a prerecorded television speech broadcast Tuesday that his government will break "the vicious cycle of hope and despair, faith and doubt, affluence and poverty, stability and chaos which had characterized the past quarter century of our national life."

To that effect, Babangida announced a state of economic emergency for the next 15 months. The emergency is intended, he said, to make Nigeria self-sufficient in food production, to make the economy less dependent on its oil exports and to reduce government interference in private enterprise.

Babangida banned the import of two staple foods, rice and corn. He also ordered an end to oil "counter-trade" deals that had been used to import consumer items and processed foods.

In addition, Babangida promised that in 1986 his government would announce a plan for a return to an elected civilian government. A source close to the military government said later Tuesday that the plan would be announced Jan. 1, 1986, but that the transition to civilian rule could take as long as three years.

Since Babangida came to power, Nigeria has been preoccupied with a debate over whether it should accept a multibillion-dollar International Monetary Fund loan that would ease the country's worsening debt burden. In return for the money, Nigeria would have to accept several politically unpalatable measures, including sharp devaluation of its currency and cuts in consumer fuel subsidies.

In his speech, however, Babangida, who had vowed earlier to break the deadlock on the IMF loan, did not say, or even hint, whether his government would take the loan.

According to a government official close to the Armed Forces Ruling Council, Nigeria's top law-making body, Babangida's senior military advisers have told him in recent days not to accept the loan. The loan has been widely condemned here as a ploy by western-influenced international lending agencies to undermine Nigeria's sovereignty.

"It is a question of national pride," the official said, adding that Babangida has not yet made up his mind on the IMF deal.

During Tuesday's ceremony at Tafawa Balewa Square, named for Nigeria's first civilian leader, who was murdered, Babangida stood in the downpour for nearly two hours.

The wind and rain finally subsided shortly before noon as the assembled soldiers fired rifles and cannons in salute to Nigeria's silver jubilee of independence.

The volleys of gunfire and low-flying aircraft frightened thousands of bats from trees near the stadium, sending them circling above the crowd as the soggy, stern-faced general was driven away in a black Peugeot.