The F.B.I. on Wednesday arrested a Navy veteran suspected of sending two envelopes to the Pentagon this week that contained raw materials for the deadly poison ricin. The man, William Clyde Allen III, was detained at a home in Logan, Utah.

Two envelopes addressed to Defense Secretary Jim Mattis and to the chief of the United States Navy, Adm. John Richardson, set off alarms in a mail screening facility outside the Pentagon on Monday. No one was injured.

Defense officials had suspected that the letters contained ricin, but a Pentagon spokeswoman said on Wednesday that they actually contained castor beans, the raw material from which ricin is made. She said the F.B.I. was investigating.

Another letter suspected of containing ricin was sent to President Trump at the White House on Monday, but was intercepted by the Secret Service. In a statement, the Secret Service said no one was injured.