PORTLAND — An Eliot man has been convicted in federal court of illegal possession of firearms and ammunition, and manufacturing marijuana.

David Widi, 27, was found guilty by a jury at U.S. District Court on Tuesday, according to a press release issued today by U.S. Attorney Paula Silsby.

Law enforcement officials executed a search warrant on Nov. 28, 2008, at Widi’s home on the Harold Dow Highway. His apartment was upstairs from a daycare center. During the search, officials found seven guns, 2,773 rounds of ammunition and 17 marijuana plants.

According to a court affidavit, informants had told police that Widi, a 2001 Marshwood High School graduate, had a motion sensor and surveillance camera mounted on the building. The informants said Widi was stockpiling weapons and had said he was “ready for war,” and “preparing for the end of the world.”

Widi was prohibited from possessing firearms because of a prior conviction for reckless conduct in 2004.

The investigation was part of Maine’s Project Safe Neighborhoods initiative, which is designed to reduce gun violence and illegal gun possession, Silsby said in the press release. The investigation was conducted by the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives, the Eliot Police Department, the Maine State Police and the Maine Drug Enforcement Agency.