A Milwaukee Muslim man arrested on a charge of trying to buy machine guns to carry out an attack on a Masonic temple also wanted to travel to the Middle East and kill Israelis but abandoned that plan as unworkable, federal agents said in court documents.

Federal prosecutors charged 23-year-old Samy Mohamed Hamzeh on Tuesday with unlawfully possessing a machine gun and receiving and possessing firearms not registered to him.

The FBI recorded conversations between Hamzeh and two federal informants talking about an attack on a Masonic temple in Milwaukee, according to an affidavit setting out the evidence against Hamzeh. Federal defender Ronnie Murray didn't return email and voicemail messages Tuesday.

Hamzeh and the two informants traveled to a gun range on Jan. 19 and practiced with a pistol, the affidavit said. Afterward, they took a tour of a Masonic temple that federal authorities declined to identify.

Masons are members of a fraternal organization that carries out a variety of activities, including charity work. Wisconsin has nearly 11,000 Masons in 180 lodges, according to Frank Struble, grand master of Free and Accepted Masons in Wisconsin. The organization is not a religion.

According to the affidavit, agents were tipped off in September that Hamzeh planned to travel to Israel in October to attack Israeli soldiers and citizens in the West Bank. He abandoned those plans due to "family, financial and logistic reasons," the affidavit said, instead focusing his efforts on a domestic attack.

Federal agents said that on Jan. 19 and into the early morning of Jan. 20, Hamzeh discussed his plans to attack the temple with the informants, telling them they needed two more machine guns — the group apparently already had one — and silencers. They planned to station one person at the temple's entrance while the other two went through the building, killing everyone they saw. They then planned to walk away from the scene as if nothing had happened, the affidavit said.

"I am telling you, if this hit is executed, it will be known all over the world ... all the Mujahedeen will be talking and they will be proud of us," Hamzeh said, according to the affidavit.

Hamzeh added that he hoped to kill 30 people, "because these 30 will terrify the world."

According to the affidavit, Hamzeh met with two undercover FBI agents Monday. They presented him with two automatic machine guns and a silencer. He paid for the weapons and silencer in cash and put them in the trunk of his car, the affidavit said. The agents then arrested him and recovered the guns and silencer.

Hamzeh had been fired recently from his job as a trainer at a downtown Milwaukee gym, said Delia Luna, the owner of the9Round Kickbox Fitness. She said he was "very intense, very militant" as a trainer.

"He didn't mix well," Luna said.

The Milwaukee Sentinel Journal reported that friends and co-workers described him as "a foolish, fun-loving man who liked to get high and put little effort into school, work or worship."