Federal prosecutors in court Monday defended a two-year-long undercover foreign bribery sting by the government, saying the executives and employees charged in the investigation knew a foreign official was supposed to receive an illegal payment as part of a supply contract.

The foreign official in the sting was, it turns out, fake. And the deal to sell $15 million in arms and equipment was all a government-controlled ruse. Last year, the authorities charged 22 people for their alleged participation in a conspiracy to violate the Foreign Corrupt Practices Act.