San Francisco Public Works Director Mohammed Nuru knew he was in trouble with the FBI when he met with agents who detailed allegations of corruption and attempted bribery. But what he did next — telling City Administrator Naomi Kelly and others that he was being investigated — prompted the feds to drop the criminal hammer on the veteran bureaucrat and charge him with fraud.

“I was shocked by what he said,” Kelly said.

Nuru was initially arrested on Jan. 21 and confronted with allegations that he had provided inside information on city contracts for public toilets and homeless shelters to his longtime friend, restaurateur Nick Bovis.

Nuru is accused of conspiring with Bovis and two undercover informants to bribe Airport Commissioner Linda Crayton with $5,000 in an attempt to win a restaurant lease at San Francisco International Airport. Bovis has also been charged with fraud.

During the meetings with the FBI, a second criminal complaint dated Jan. 28 alleges, Nuru admitted that he had accepted gifts in exchange for official acts as the director of San Francisco Public Works. Those involved a Chinese developer who was having difficulties on a Hayes Valley project.

The feds, however, were apparently looking for bigger fish, so they released Nuru on the condition that he cooperate with “a pending public corruption investigation.”

He also agreed that he would “not tamper with any witness or obstruct any criminal investigation” or disclose his cooperation with the government. Nuru also agreed that statements he made during meetings with the government — including his agreement to keep quiet — “could be used against him and possibly result in charges of perjury, making false statements or obstruction of justice,” the complaint states.

But Nuru chose not to keep quiet.

According to the FBI complaint, within a week of his agreement, “he had in fact disclosed his arrest, the investigation and his cooperation” to Kelly, “as well as other subjects and witnesses in the investigation.”

Kelly confirmed to The Chronicle that Nuru had communicated with her. Kelly is Nuru’s direct supervisor.

“I don’t want to get into what was said in my conversation with Mr. Nuru, as this is an ongoing investigation,” Kelly said of their telephone discussion last week.

The next day Kelly informed Mayor London Breed that Nuru had told her he’d been approached by the FBI.

“The mayor immediately recognized the severity of the situation and reported it to the city attorney,” mayoral spokesman Jeff Cretan said.

On Monday, Kelly also contacted the city attorney, then went over to the Federal Building and sat down with investigators. The next day, the FBI hauled Nuru back in.

Initially, Nuru allegedly claimed that he had not talked about his arrest, the investigation or his cooperation to anyone that he worked with at City Hall, according to the criminal filing.

After being confronted about his conversation with Kelly, Nuru allegedly “confessed that he had lied and admitted that, on multiple occasions the prior week, he had discussed the investigation and his cooperation with the government with the senior city official.

“He also identified several other witnesses in the investigation with whom he had discussed the charges against him and or the investigation,” the criminal complaint alleges.

The agents promptly pulled the plug on the cooperation agreement and charged Nuru and Bovis with one count each of wire fraud in connection with the alleged scheme to bribe Crayton.

Nuru is separately charged with lying to the FBI for failing to keep quiet about the investigation. Both men face up to 20 years in prison on the fraud charge.

San Francisco Chronicle columnist Phil Matier appears Sundays and Wednesdays. Got a tip? Call 415-777-8815, or email pmatier@sfchronicle.com. Twitter: @philmatier