A Milwaukee man allegedly planning a mass shooting at a Masonic temple has been arrested after buying machine guns and a silencer from undercover FBI agents.

Samy Mohamed Hamzeh, 23, wanted to kill 30 people and outlined detailed plans during conversations with confidential FBI sources, the US Department of Justice said in a statement.

Hamzeh thought the two sources were his accomplices. Their conversations happened in Arabic and were recorded and transcribed by the FBI since October last year.

He had once planned to travel to Jordan to attack Israeli soldiers and citizens in the West Bank and has been under investigation since September.

Scroll down for video

Samy Mohamed Hamzeh, 23, was arrested after buying machine guns and a silencer from two undercover FBI agents. He planned to carry out a mass shooting at a Masonic temple in Milwaukee

Hamzeh abandoned these plans because of family, financial and logistical reasons and decided to conduct an attack in the United States instead, according to the criminal complaint.

He settled on the Masonic temple, where Masons gather for fraternity meetings, earlier this month.

Hamzeh went to a local shooting range with the two FBI sources in January to practice shooting a handgun.

That same day, they took a guided tour of the Masonic temple with the two FBI sources in January, learning about meeting schedules and where people would be located during the meetings.

After the visit, Hamzeh discussed the attack in further detail, saying they would need one machine gun per person and three silencers.

Hamzeh discussed the attack with two confidential FBI sources, thinking they were his accomplices

He said that one of them would have to stay at the main door while the two others went upstairs to kill people during a meeting.

'As long as the one on the door understands he has bigger responsibility than the others,' Hamzeh said according to transcripts published by the US Department of Justice.

'For your information, he has to take care of everyone around him, the comers and the one that wants to go, he has to annihilate everyone, there is no one left, I mean when we go into a room, we will be killing everyone, that's it, this is our duty, as for the one at the door, he must have 20/20 eye vision and always alert for all the traffic around him.'

'We are Muslims, defending Muslim religion, we are on our own, my dear, we have organized our own group,' he added.

'We have our own group, not with Hamas, not with my a*s, we are here defending Islam, young people together join to defend Islam, that's it, that is what our intention is.'

Hamzeh said killing 30 people would be 'excellent'.

'If I got out, after killing thirty people, I will be happy 100 per cent... Because these 30 will terrify the world,' he said.

'I am telling you, if this hit is executed, it will be known all over the world,' he added.

'Sure, all over the world, all the Mujahedeen will be talking and they will be proud of us.'

Later in January, Hamzeh went to buy machine guns and silencers from two people who turned out to be undercover FBI agents.

They showed him the weapons and a silencer to Hamzeh, telling him that the weapons were capable of automatic fire and explaining how to use selector switch to fire automatically.

Hamzeh agreed to a price and paid it to the undercover agents, who then handed him a bag containing two automatic weapons and a silencer.