The U.S.N.S. Mercy, a Navy hospital ship, arrived at the Port of Los Angeles on Friday to bolster a health care system that officials worry could be overwhelmed by a surge in coronavirus patients.

One train operator and engineer who worked at the port grew suspicious, he later told the authorities, according to an affidavit by an F.B.I. special agent, Douglas Swain.

The engineer, Eduardo Moreno, told investigators that he wondered if the ship had some unstated purpose, or something to do with a government takeover, one of several baseless conspiracy theories emerging about the government’s handling of the outbreak.

Those unfounded suspicions bubbled over on Tuesday when Mr. Moreno, at the end of his shift, sent a train off its tracks at full speed and crashed it some 250 yards away from the Mercy, according to prosecutors and Mr. Moreno’s statements recorded in the affidavit.