A U.S. Navy commander has been charged with espionage and attempted espionage, and communicating defense information to a foreign nation, CBS News has learned.

The officer, whose name is redacted from the charging document, was charged with two counts of espionage, three counts of attempted espionage and five counts of communicating defense information.

Charging documents assert that the commander shared secret information relating to U.S. national defense to a representative of a foreign government.

Get Breaking News Delivered to Your Inbox

The commander was also charged with one count of prostitution and one count of adultery.

The U.S. Naval Institute (USNI) reports that several sources familiar with the case said the country to which the commander passed secrets was China.

USNI also reports the commander was Lt. Cmdr. Edward C. Lin, who served on some of the Navy's most sensitive intelligence gathering aircraft. USNI reports Lin was a Taiwanese national before his family moved to the U.S. One source confirms to CBS News the name of the officer is Lt. Cmdr. Edward Lin.

An Article 32 hearing was held on Friday, April 8.

The investigation is being conducted jointly by the FBI and NCIS.

The last notorious case of a Navy officer spying happened in the 1980s.

John Anthony Walker worked as a Soviet spy while serving as communications specialist for the U.S. Navy.

He led a ring that delivered key information to the Soviet Union from 1967 until 1985. Walker's covert dealings made it possible for the Soviets to unscramble military communications and find U.S. submarines at any time.

He had already retired as a Navy officer when arrested in 1985. Other members of his ring included his sailor son Michael, his brother Arthur James Walker, who also served in the Navy, and his friend Jerry Alfred Whitworth, who trained in the Navy's satellite communications. Though Walker is thought to have won a high military rank from the Russians, he also became a member of the Ku Klux Klan and the John Birch Society.

Many believe that John Walker's actions were the biggest security breach of the Cold War. Once arrested, Walker would only agree to plead guilty if his son was granted leniency for his minor involvement. Walker was given three life sentences, and died in prison in 2014.