(SAN DIEGO) — Two Navy sailors accused of spying for China will appear in federal court on Tuesday in California, days after being arrested and accused of surreptitiously relaying sensitive government information to foreign officials.

Jinchao “Patrick” Wei, a petty officer 2nd class, was arrested Wednesday and charged with espionage — more specifically, conspiracy to and committing the communication of defense information to aid a foreign government.

Petty Officer Wenheng Zhao, of Monterey Park, California, was also arrested Wednesday, by FBI and NCIS agents, and is charged with conspiracy and receipt of a bribe by a public official.

Wei will be in court in San Diego for a detention hearing at 2 p.m. local time.

Zhao will be in court in Los Angeles for a detention hearing at 10 a.m. local time.

Both men had initial appearances on Thursday. Zhao has not entered a plea; Wei had a plea of not guilty entered on his behalf. Wei’s attorney did not return a request for comment and Zhao has not retained a lawyer who could comment on his behalf.

What prosecutors allege the sailors did

According to the indictment against him, 22-year-old Wei served as a machinist’s mate aboard the amphibious ship USS Essex, which has recently been receiving maintenance at Naval Base San Diego.

Zhao, 26, worked at the Naval Base Ventura County in Port Hueneme and had an active U.S. security clearance who had access to classified information, officials said last week.

Both Zhao and Wei are accused of having passed along national defense information to Chinese intelligence officials in return for cash payments, though their cases are separate.

They are alleged in their indictments to have each worked with Chinese intelligence officers to whom they passed along sensitive information related to the technologies they worked with and about upcoming Navy operations, including international military exercises.

Zhao’s indictment states he had access to material classified as secret, as did Wei, who was born in China and became a U.S. citizen in 2022 as he was allegedly also sending information to his handler, according to his indictment.

“Through the alleged crimes committed by these defendants, sensitive military information ended up in the hands of the People’s Republic of China,” Matthew Olsen, the Justice Department’s assistant attorney general for national security, said at a press conference in San Diego last week.

“The charges demonstrate [China’s] determination to obtain information that is critical to our national defense by any means so it can be used to their advantage,” Olsen continued. “The alleged conduct also represents a violation of the solemn obligation of members of our military to defend our country to safeguard our secrets and to protect their fellow service members.”

China didn’t comment after Wei and Zhao’s arrests last week but generally denies being involved in espionage abroad.

U.S. officials said Wei allegedly began communicating with an intelligence officer from China’s government in February 2022 who tasked him with passing photos, videos and documents concerning U.S. Navy ships and their systems.

Wei is alleged to have passed along imagery of the USS Essex, provided the locations of various Navy ships and provided manuals for systems aboard his ship and other Navy ships.

In June 2022, Wei was paid $5,000 by the Chinese intelligence official after having passed along the initial batch of those manuals, officials alleged.

Zhao is alleged to have begun working with a Chinese intelligence official in August 2021 and continuing to do so through at least May of this year, according to his indictment. He worked as a construction electrician.

He passed along photos and videos, blueprints for a radar system in Okinawa and operational plans for a “large-scale” U.S. military exercise in the Pacific Ocean, officials claim in the indictment.

In exchange for this information, the indictment against Zhao alleges that he received around $14,866 in payments from the Chinese intelligence officer.

Martin Estrada, the U.S. attorney for the Central District of California, said Thursday that Zhao “betrayed his sacred oath to defend our country” and “sold out his colleagues at the U.S. Navy.”

“The case against Mr. Zhao is part of a larger national strategy to combat criminal efforts from nation state actors to steal our nation sensitive military information,” Estrada said.

A Navy spokesperson said in a statement last week, of Wei and Zhao, that “we take allegations of misconduct seriously, and the Navy is cooperating with the Department of Justice.” The spokesperson referred other questions to prosecutors.

ABC News’ Alexandra Hutzler and Alex Stone contributed to this report.

Copyright © 2023, ABC Audio. All rights reserved.