WASHINGTON — The Navy is weighing charges of espionage against an officer who is a naturalized American citizen and has been under investigation since last year on suspicion of providing secret information to China and Taiwan, United States officials said.

The allegations against the officer, Lt. Cmdr. Edward C. Lin, 39, who was born in Taiwan, are part of a secretive espionage case in which Commander Lin is also accused of visiting a prostitute. United States officials, who were not authorized to speak publicly because the investigation into the officer is continuing, said Navy investigators believed that Commander Lin provided secret information to a Chinese girlfriend.

The officials could not say how the information was then passed on to Taiwanese or Chinese officials, but Commander Lin, a flight officer whoworked on Navy spy planes, is accused of communicating secret information knowing that it would be used by a foreign government. The other charges being considered against Commander Lin include hiring a prostitute, committing adultery — a crime in the military — and not disclosing foreign travel to the United States government, and then lying about it.

For Commander Lin, who moved to the United States as a teenager, the allegations represent a huge reversal. The Navy had held him up as an example of what immigrants can achieve in the United States and in the military.