New Zealand First leader Winston Peters has used a Parliamentary motion on the Orlando shootings to rail against migration and refugees in New Zealand.
Before Question Time today, party leaders in Parliament took turns to express sympathy with the victims of the mass shooting on Sunday (NZ time), in which 49 people died.
During his short speech, Mr Peters said the massacre was carried out by someone whose parents had sought shelter in the United States.
"There are those who will take the politically correct view and blame it all on a lack of gun control," he said.
"They are wrong. They have been misled. They are seeking to divert blame from where it should lie."
Mr Peters said the incident was the result of "loose security and border controls", which also existed in New Zealand.
"In short ... we are inviting that problem in our country by the looseness and the cavalier attitude we are taking as a country to matters of security."
The New Zealand First leader cited the attempted hijacking of a plane by a Somali refugee in New Zealand in 2008 and said there were "countless" other examples.
Mr Peters also urged "moderate Muslims" in New Zealand to alert police about any suspicious behaviour.
His speech upset other MPs in the debating chamber.
"That was disgraceful," Green Party co-leader James Shaw tweeted.
@cjsbishop That was disgraceful.— James Shaw (@jamespeshaw) June 14, 2016
The shooter in the Orlando killings, Omar Mateen, was born in New York to Afghani parents.
Mr Peters comments followed the Government's decision to lift the refugee quota by 250 places - a decision that the New Zealand First leader supported as long as it was accompanied by tighter immigration controls.
Earlier, Prime Minister John Key expressed condolences to the victims of the Orlando attack and said that New Zealand stood with the US in its fight against violent extremism.
"Over the days and weeks ahead we will learn more about the motivations behind this senseless tragedy.
"But right now there are many people grieving -- the victims' families and friends and the gay and lesbian community in Florida and around the world.
"All too often we see these hateful attacks and mass shootings taking the lives of innocent victims."
Labour leader Andrew Little said the shootings were an act of terror and a targeted attack on the LGBTI community.
"It was the deliberate mass murder of LGBTI people because of who they were and who they loved.
"These young people were attacked and murdered in a place that was meant to be safe for them, that was meant to be a haven where they could go to dance, have fun and be themselves."