The commander of U.S. forces in the Pacific agreed to quit his post and retire after telling reporters Friday the U.S. servicemen accused of raping a 12-year-old Okinawan girl should have sought sex for hire instead.

Defense Secretary William Perry said Friday night he had discussed the matter with Adm. Richard C. Macke and decided there was "no other choice" than early retirement. Macke, with 35 years of service, is one of the most senior American commanders, overseeing all U.S. operations in the Pacific."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."

A close Perry aide, speaking on condition of anonymity, said Walter Mondale, the U.S. ambassador to Japan, concurred in the decision that Macke must go.

Perry acted a few hours after Macke issued a written apology for his remarks. He said Macke offered to retire after his remarks earlier Friday set off a firestorm of controversy.

On Friday morning, Macke said the recent rape of a 12-year-old Okinawan girl could have been avoided if the three accused U.S. servicemen had instead sought a prostitute.

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

Macke made the remark to reporters after saying military officials had found nothing in the background of the three accused servicemen to suggest they would commit such a crime.

A four-star admiral, Macke was one of the most senior commanders in the military. He oversaw the operations of all Air Force, Navy, Army and Marine Corps forces in the Pacific.

He is the most senior U.S. military officer to be forced from command since Air Force Chief of Staff Michael Dugan was fired by former Defense Secretary Richard Cheney in September 1990 for saying too much in public 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 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.

News accounts of Macke's comments caused a stir at the White House, the Pentagon and elsewhere in Washington. Sen. Dianne Feinstein, a member of the Senate Foreign Relations Commission, 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 a written statement apologizing for the comment.