A 27-year-old male naval officer has been charged with raping a female officer in her stateroom aboard the ammunition supply ship USS Suribachi while it was on deployment in the Mediterranean Sea, a Navy spokesman said yesterday.

Lt. j.g. Robin E. Brown has been ordered to appear at a general court-martial on the rape charge July 2 in Naples, Italy, officials said.

The female ensign alleged that Brown raped her after bursting into her room aboard the ship during a port call in Cartagena, Spain, on April 4. Navy officials said the women reported the allegations to superior officers on the ship immediately after the incident.

Navy officials said the incident is not believed to be the first time rape charges involving officers have been filed aboard a naval vessel, but said the service does not keep records of such incidents.

Women are now assigned to about 58 naval ships but remain a minority on them, according to officials. Aboard the Suribachi, which was supplying warships recently dispatched to the coast of Liberia to assist in evacuation efforts, four of the ship's 22 officers and 31 of the 368 enlisted crew members are women.

Many women serving aboard naval ships have complained of sexual harassment from male colleagues unaccustomed to working with women. Many of the women say working conditions have improved as more women are assigned to the ships.

The incident aboard the Suribachi was first reported in the weekly newspaper Navy Times in yesterday's editions.

The alleged rape victim remains on duty aboard the Suribachi and Brown has been reassigned to a desk job at the naval base in Rota, Spain, while awaiting the court-martial, officials said.

If convicted of rape, his maximum punishment could be life imprisonment, dismissal from the Navy and loss of all pay and allowances, officials said.