Prime Minister Jacinda Ardern chats to Stephen Colbert after Texas shooting

Prime Minister Jacinda Ardern has spoken with US TV host and comedian Stephen Colbert about the school shooting in Texas, as part of her trip to the United States.

Ardern was appearing on The Late Show studio for the third time, on the same day more than 20 people were shot dead at Robb Elementary School by an 18-year-old in the city of Uvalde.

Colbert had visited New Zealand months after the terror attack on mosques in Christchurch.

He asked how New Zealand was able to pass laws in response to the attack, "when we can't pass so much as universal background checks for people with mental illness of violent behaviour even though 91 percent of Americans approve that".

Ardern said being confronted by those kinds of events playing out from afar, she would see them "as a mother", but New Zealanders were very pragmatic people.

"When we saw something like that happen, everyone said never again, and so it was incumbent on us as politicians to respond to that. Now, we have legitimate needs for guns in our country for things like pest control and to protect our biodiversity, but you don't need a military-style semi-automatic to do that."

There was still work to do after the buy-back scheme, and she would not say the system was perfect but "we saw something that wasn't right and we acted on it and I can only speak to that experience".

She also spoke to Colbert about her daughter Neve getting a briefcase from the government, after the three-year-old grew jealous of her mother's.

"This is how great and how friendly these people are, the New Zealand government put together a briefcase for Neve to have at the end of the day."

Ardern said Neve called it her "busy work" and imitated the girl's bitter disappointment if she ever came home without it.