SAO TOME, Sao Tome and Principe (AP) _ The president of Sao Tome and Principe returned to this West African island nation Wednesday under a deal giving amnesty to the military forces who ousted him last week.

Fradique de Menezes was accompanied by Nigerian President Olusegun Obasanjo, whose country has an arrangement to share huge offshore oil reserves with Sao Tome. Menezes hugged members of his Cabinet on arrival.

The deal, negotiated between the coup leaders and international envoys, calls for the formation of a new government _ with Menezes remaining president _ and political guarantees that Menezes respect the separation of powers between the presidency, parliament and other state institutions, Lisbon radio station TSF reported.

Since taking office in September 2001, Menezes has fired four prime ministers and dissolved parliament once.

``Africa and the world are proud of the work we have done,'' said Gabon's foreign minister, Jean Ping, part of a team of international envoys negotiating with coup leaders since Sunday.

Coup leader Maj. Fernando Pereira called the deal ``a big step for the resolution of this crisis,'' saying ``the national parliament has been restored.''

Carlos Neves, vice president of parliament, said lawmakers will meet Wednesday night to consider amnesty for those behind the coup, including leader Army Maj. Fernando Pereira.

``We're trying to get a quorum to approve the amnesty law today,'' Neves said.

Troops said they seized power July 16 because of ``the continuing social and economic decline'' of this oil-rich but very poor country in the Gulf of Guinea. Menezes, elected to a five-year term in 2001, was visiting Nigeria at the time.

The negotiations included delegations from Nigeria, the Community of Portuguese-Speaking Countries and the Economic Community of Central African States.

The United States, the United Nations, the Community of Portuguese-speaking Countries and the 53-nation African Union all demanded the restoration of constitutional order in this former Portuguese colony.

Some countries and the World Bank threatened the rebels with diplomatic isolation and cuts in aid.

Sao Tome and Principe is an impoverished nation of about 140,000 people in a region of growing international importance. The islands are in one of the continent's most active oil exploration areas.

The coup leaders detained seven government ministers at military installations before releasing them Sunday. All are at their homes under military guard.

Prime Minister Maria das Neves has been hospitalized under military surveillance since the coup after collapsing following her arrest. She is being treated for high blood pressure.