WASHINGTON — A leading US scientist who had worked at the White House and NASA could face execution for offering to sell secrets to Israel for two million dollars, according to documents filed in federal court.

Stewart Nozette, 52, is set to appear in court Thursday for a hearing on whether he should remain in detention after he was arrested in a sting operation involving an FBI agent posing as an Israeli official.

Nozette, arrested Monday, is charged with two counts of attempted espionage for allegedly trying to sell secrets to Israel, according to court documents filed late Wednesday.

Based on the indictment allegations, "the maximum penalty the defendant faces, if convicted, is death," said the government filing supporting Nozette's continued detention pending trial.

In Nozette's talks with the alleged Israeli agent, the scientist said he wanted "roughly two million dollars as compensation for his espionage."

Nozette "delivered and communicated this classified information to an individual he believed was an Israeli intelligence officer in exchange for an alias, a foreign passport, and cash payments," and therefore should remain in detention, the court documents said.

In their final discussion, the undercover FBI agent handed Nozette 10,000 dollars in one hundred dollar bills, which he tried to hide inside a hotel bathroom toilet tank when federal agents arrested him.

The defendant "attempted to transfer some of our nation's most guarded and sensitive secrets, to which he had been granted access when he served in positions of trust for the United States."

There is "extremely strong evidence" that Nozette would flee the country if he were released pending trial, the document said.

A prominent scientist credited with helping discover water on the moon, Nozette had worked at the US space agency NASA, the Energy Department, and even served on the White House's National Space Council in 1989 and 1990, under then-president George H.W. Bush.

The investigation appears to have been sparked by his work with an Israeli company, and comments he made to a colleague.