A former Bronx man who allegedly talked to an FBI informant about joining ISIS and avenging the Christchurch mosques shooting in New Zealand has been busted in Montana, where he moved last month.

Fabjan Alameti, 21, was arrested at a gun range — where he’d rented an M1A rifle for target practice — and faces gun possession and drug charges; he was also charged with making false statements involving international and domestic terrorism.

Alameti told an informant in January that he wanted to fight with ISIS in Iraq and Syria and to carry out an attack in the US against a military facility, recruitment center, government building, “gay club” or Jewish temple, the charges allege.

He later said he would not actually carry out an attack in the US because America had granted him citizenship.

After shootings at two mosques in Christchurch left 50 people dead, Alameti allegedly told the informant, “I will attack random people to avenge their blood.”

Accused shooter Brenton Harrison Tarrant of Australia faces 50 murder charges and 39 attempted murder charges for the March 15 massacre.

With wires