WASHINGTON (AP) _ One of the nation's most senior military commanders is being forced into retirement after saying the U.S. servicemen accused of raping a 12-year-old Okinawan girl should have sought out a prostitute instead.

Defense Secretary William Perry said Friday night he had spoken with Adm. Richard C. Macke, commander in chief of the U.S. Pacific Command, and decided there was ``no other choice'' for the officer than early retirement.

The rape caused a huge outcry in Okinawa and elsewhere in Japan over the attack and protests over the presence of U.S. troops there. President Clinton and other top American officials have made public apologies in an effort to end the furor.

Macke, with 35 years of military service, commands 330,000 American soldiers, sailors, airmen and Marines in one of the world's most strategic regions. He oversees all U.S. military operations in the Pacific, including Japan and South Korea.

Perry acted a few hours after Macke, in an attempt to save his job, issued a written apology for his remarks earlier Friday about the Sept. 4 rape for which three U.S. servicemen are on trial in a local court in Okinawa.

On Friday morning, Macke told reporters the rape, while regrettable, could have been avoided if the three accused Americans had instead hired a prostitute.

``I think that it was absolutely stupid, I've said several times,'' Macke, 57, said during a breakfast interview with defense writers. ``For the price they paid to rent the car they could have had a girl.''

Shortly after news reports of his remarks became known, Macke apologized. A few hours later, Perry, who had been at Bosnian peace talks in Dayton, Ohio, announced Macke would retire early.

``We decided that his lapse of judgment was so serious that he would be unable to perform effectively his duties ...,'' Perry said in a written statement. ``The obstacles he faces in working effectively with the government and the people of Japan in the future left no other choice.''

U.S. Ambassador Walter Mondale apologized to Japan today for the admiral's remark. Japanese officials said they worried Macke's comments would have repercussions in Okinawa.

``I absolutely cannot believe this statement,'' Foreign Minister Yohei Kono said in Osaka, where he was attending a Pacific trade forum.

Japan's Foreign Ministry spokesman, Hiroshi Hashimoto, said Mondale met Kono and emphasized that what the admiral said ``doesn't reflect the Clinton administration's position.''

``I hope the Okinawans will understand that,'' Hashimoto said.

But Fumiko Maeda of the Okinawa chapter of the New Japan Women's Association said the comment was unforgivable. ``Each time we have swallowed our anger and sorrow, but we can't stand it anymore.''

Macke prefaced his remark by saying military officials had found nothing in the background of the three accused servicemen to suggest they would commit a rape.

Macke is the most senior U.S. military officer to be forced from command since Air Force Chief of Staff Michael Dugan was fired by then-Defense Secretary Dick Cheney in September 1990 for speaking too publicly about U.S. plans for bombing Iraq after its invasion of Kuwait.

Two Marines and a Navy seaman are on trial in Okinawa on charges that they abducted the Okinawan girl on Sept. 4 in a rental car and drove her to a secluded sugar cane field. Seaman Marcus D. Gill, 22, admitted in court that he raped the girl.

Sen. Dianne Feinstein, a member of the Senate Foreign Relations Committee, said she was stunned by the admiral's remarks.

``I would say to Navy Secretary John Dalton, your guys still don't get it. You better teach 'em, or else,'' said Feinstein, D-Calif. ``Rape isn't about money and it isn't about sex. It's about power over women and it's a very degrading, terrible, major felony.''

Macke later issued his written apology.

``I made a serious mistake this morning,'' the statement said. ``My recent comment was the result of my frustration over the stupidity of this heinous and incomprehensible crime against the young lady. I regret any misunderstanding my comment may have caused.''

White House press secretary Mike McCurry said national security adviser Anthony Lake contacted the Pentagon to express Clinton's concern over Macke's remark.

In a televised interview with Japanese journalists Friday, the president said he wanted the Japanese people to know that all Americans ``share their outrage and their pain'' over what happened to the girl.

``It's a terrible thing, and every father in the world of a young daughter, including the president of the United States, was struck by this incident,'' Clinton said.