SAN FRANCISCO (BCN) — Two San Jose men pleaded guilty in federal court in San Francisco this week, admitting to a securities fraud scheme that netted one of the men nearly $1 million.

Benjamin Wylam, 42, and Nathaniel Brown, 49, signed separate plea agreements that admitted their guilt to a charge of securities fraud. Each faces a maximum sentence of 25 years in prison — and either $250,000 in fines or an amount up to twice their gross gains — at sentencing hearings in September.

READ MORE: Coast Guard: Cargo Ship Dragging Anchor Likely Caused SoCal Oil Spill

The two were also charged by the U.S. Securities and Exchange Commission in a case that included four other people.

According to news releases issued Wednesday by the office of Acting U.S. Attorney Stephanie Hinds and the SEC, Brown was employed as a senior revenue manager at Infinera Corporation in Sunnyvale when he shared private information with his friend Wylam, a teacher.

Wylam’s admitted that between April 2016 and November 2017, he received information from Brown and made transactions in Infinera securities to make a profit of $999,959.

READ MORE: Fairfield Police Arrest 4 Suspected in Catalytic Converter Theft Ring

The men tried to conceal their actions, an effort that included Wylam unfriending Brown on Facebook, prosecutors said.

The two men also faced civil charges by the SEC in a case that included four others, Naveen Sood, Marcus Bannon, Matthew Rauch and Naresh Ramaiya. Wylam was accused of sharing the insider information with Sood, who in turn shared it with the three other men named in the case.

In the SEC case, Bannon, Rauch and Ramaiya consented to the final judgments without admitting or denying the allegations in the complaint.

Bannon agreed to pay a civil penalty of $281,497, Rauch agreed to pay a civil penalty of $128,230, and Ramaiya agreed to pay a civil penalty of $65,780. Sood also consented to the entry of a final judgment and agreed to pay a civil penalty of $178,320.

MORE NEWS: 8 People Displaced by House Fire in San Lorenzo