U.N. Secretary General Javier Perez de Cuellar underwent a quadruple coronary bypass operation at a New York hospital today. His spokesman said he "should be able to return to work within a few weeks."

The unheralded medical crisis arose just as diplomats were coming to grips with the question of whether the 66-year-old Peruvian diplomat would agree to serve a second five-year term when his first one expires at the end of this year.

The five major powers -- Britain, China, France, the Soviet Union and the United States -- each of which can veto any candidate, all prefer that Perez de Cuellar stay on. All would have liked the decision to have been made by September.

Perez de Cuellar had ruled out the idea of actively campaigning for the renewal, but his own aides and most diplomats believed he would accept it at the request of the U.N. Security Council.

Now, however, the politics of succession have been put on hold.

Perez de Cuellar, who had experienced a brief stomach disorder one year ago but had no history of heart trouble, returned last week from a trip through Europe complaining that he felt weak, spokesman Francois Giuliani said.

After an initial visit from his doctor, he canceled a scheduled tour of Africa -- to attend the Organization of African Unity summit meeting, among other stops -- and checked into Mount Sinai Hospital on Tuesday for a stress test. He underwent what Giuliani called further routine testing, including a catheterization, yesterday.

The results of those tests indicated the need for the bypass and the decision was made -- as a matter of preference rather than necessity, Giuliani said -- to proceed with the surgery today.

The four-hour operation was performed by Dr. Randall Griepp, the hospital's chief of cardiothoracic surgery.

During the absence of the general secretary, the various undersecretaries will run their own departments, under the coordination of U.N. Chef de Cabinet Virendra Dayal. The ranking U.N. officer will be Jeane Ripert of France, the director general for development and economic cooperation.

"The unanswered question," said one U.N. official, "is whether Perez de Cuellar now says to himself that he wants to do something sensible with his life rather than stay on in this accursed job.