PARIS, OCT. 18 (SUNDAY) -- Federico Mayor, a Spanish biochemist pledged to reform UNESCO and bring the United States back into its fold, was chosen as director general early today to lead the organization out of a crippling financial and political crisis.

Mayor, 53, was elected by UNESCO's Executive Board after 12 days of complex maneuvering at the end of which the widely criticized current director general, Amadou Mahtar Mbow, angrily withdrew his controversial candidacy for a third six-year term.

Mbow, a 66-year-old Senegalese educator, was at the center of charges from a number of western governments that UNESCO suffered from bad management and antiwestern bias.

These charges led the Reagan administration in 1984 to pull out of the institution, the United Nations Educational, Scientific and Cultural Organization. Britain and Singapore followed suit in 1985, leaving UNESCO without a third of its budget and raising fears for its survival.

U.S. officials have said Mbow's removal alone is not enough to guarantee a return to UNESCO, which they insist needs major budgetary and managerial reforms. But European diplomats predicted that with Mayor as its head, UNESCO will improve its tarnished image and make the changes necessary to draw back the United States, Britian and Singapore within a few years.

Mayor's closed-door election, by a 30-to-20 vote in the fifth round, took place after a night of procedural wrangling by Mbow's disappointed supporters among African nations. The victorious Spaniard, a former education minister in Madrid, must now be endorsed by the full UNESCO General Conference, which is scheduled to begin a meeting at UNESCO headquarters here next week.

Since UNESCO was founded after World War II to promote education and cultural exchange, the conference has rejected the board's choice only once, in 1948. Mayor's election appeared likely to win easy confirmation.

The unusually hard-fought struggle for leadership of UNESCO's bureaucracy largely pitted Third World nations, which see the organization as particularly theirs, against the industrialized world, which finances most of the budget. In that spirit, Mbow accompanied his surrender last night with charges that big-power "pressure and threats of all sorts" along with "blackmail and disinformation" contributed to his defeat, according to his withdrawal letter released to reporters.

Mbow said last October that he would not seek reelection, in an effort to remove the organization from the political controversy that clouded his tenure. He nevertheless lobbied quietly for support and gained endorsement from the Organization of African Unity, turning his candidacy into a point of honor for African and Arab delegates on the 50-nation executive board.

France and other western countries initially backed Foreign Minister Sahabzada Yaqub Khan of Pakistan, saying he was best placed to return the organization to smooth operation. But Khan withdrew after the second of five rounds of voting after it became apparent that he had little chance of victory.

Yaqub Khan failed to win support, particularly from Latin American nations, largely because of his role as a career military officer and as foreign minister for a government headed by a general who came to power in a military coup d'etat. In addition, he was identified by some African diplomats as the "U.S." or "western" candidate running against Mbow, the first African to head a major international organization.

The United States, outside UNESCO since 1984, had no voting rights. But U.S. observers were active in diplomatic talks surrounding the election. U.S. officials had said that Washington would not return if Mbow were reelected.

Britain also had said it would not return if Mbow remained. In addition, Japan, Switzerland, the Netherlands and West Germany gave strong indications that they might pull out if Mbow were reelected.

These pullouts would further have crippled UNESCO's budget, already amputated by one-third by the withdrawals of the United States, Britain and Singapore. This fear appeared to have been the major factor in Mbow's loss of support and represented the "pressure" he complained about in withdrawing.

The Soviet Union, for example, intially supported Nikolai Todorov of Bulgaria. But diplomatic sources said the Soviets and their allies were eager to avoid seeing UNESCO collapse and by last night were urging Mbow to withdraw.

France, which switched its support to Mbow on Khan's withdrawal, was the Senegalese veteran's only western supporter after most European countries got behind Mayor. This reflected France's traditionally close relations with Africa.