Image copyright Unicef Image caption Sonny Bill Williams visited refugee camps in Lebanon earlier this month

Rugby union star Sonny Bill Williams has posted graphic images of dead children on Twitter after a visit to Syrian refugee camps in Lebanon.

Williams, who played a starring role in New Zealand's Rugby World Cup win, was in Lebanon as a Unicef ambassador.

On Tuesday night he tweeted graphic images of two bodies, adding, "What did these children do to deserve this?"

But the UN children's agency objected to his use of the images, and said Williams had not consulted its staff.

"We see it as a fundamental infringement of those children's rights," Unicef spokesman Patrick Rose told the New Zealand Herald.

Although it was clear that Williams had been deeply moved by his visit to Lebanon, Mr Rose said it was better to provide a "positive framework for people to respond" by offering children clean water and counselling.

The rugby player also provoked a mixed response among his 556,000 followers on Twitter, with some users praising him for his honesty and others questioning his judgment.

"Please use trigger warnings by putting 'TW: dead children' in the tweet next time. It's very triggering as someone who has seen dead bodies like this before growing up," one user wrote.

Image copyright Getty Images Image caption Sonny Bill Williams helped New Zealand win the Rugby World Cup in October

No further details were shared about the location of the photos or the identity of the children.

Williams visited refugee camps in Lebanon's Bekaa Valley earlier in December, where he met Syrian children and their families.

"This was such an eye-opener… [I was] so ignorant as to what was going on over this way," Williams said in a video.

"It's been an amazing few days, it's definitely changed me for the better, and I'll definitely look at things in a different light when I get back.

"This summer share a thought for the innocent lives lost every day in war."

Williams made international headlines at the Rugby World Cup in October when he gave his winner's medal to a young pitch invader following the All Blacks' 34-17 victory over Australia.

He is a major figure in both New Zealand and Australia, where he played professional rugby league for the Canterbury Bulldogs.