Kane Williamson struck a defiant century Wednesday but was unable to put New Zealand in control in the first Test against Bangladesh in Sylhet.

The visitors reached 266-8 at stumps on the second day, still trailing Bangladesh by 44 runs in the first innings.

Williamson hit 104 off 205 balls in his 29th Test century with 11 fours, before Taijul Islam broke through his defence to bowl out the right-hander.

"I mean, you just see all around the world, he's amazing and how he sort of works out different attacks, different sort of ways people are trying to get him out, different surfaces," New Zealand coach Luke Ronchi said in praise of Williamson.

"So to be able to do it the way he does and the calmness he shows in situations is awesome," Ronchi added. "He's done it a lot, but a lot of our young guys can see how he does it."

Taijul was the pick of the Bangladesh bowlers with 4-89, while Mehidy Hasan Miraz, Nayeem Hasan, Shoriful Islam and Mominul Haque claimed one wicket apiece.

"I think the spinners bowled well. We could have created some more pressure. We took eight wickets in the end, so it is a good day for us," Bangladesh spin coach Rangana Herath said.

Herath praised Taijul for bringing his wealth of experience to the fore.

"Taijul is always helping the attack. He is our leading spinner. He created a lot of pressure," said Herath.

"He created a lot of angles. He has great experience, knowledge and understanding. I am so happy that he took four wickets today."

Glenn Phillips scored 42 runs to boost Williamson in their 78-run sixth-wicket partnership -- which dug the visitors out of a hole after they lost the top half of their batting order for 175 runs.

Occasional left-arm spinner Mominul forced Phillips to give a catch at slip, ending their partnership.

Williamson took a single off Nayeem to complete his hundred off 189 balls, drawing him level with Don Bradman and Virat Kohli in terms of Test centuries.

- Tail wagging -

Ronchi remained confident of New Zealand's tail wagging.

"We've still got two wickets in hand and hopefully tomorrow morning we come back," he said.

"And the guys left can put some more runs on the board and get us closer to the Bangladesh score, definitely."

Taijul redeemed himself for dropping Williamson at midwicket on 63 by taking the wicket of the former New Zealand captain and Ish Sodhi (0) in successive overs.

Daryl Mitchell earlier rode his luck to reach 41 before he was stumped by Nurul Hasan, off Taijul's bowling.

Mitchell, who put on 66 runs with Williamson for the fourth wicket, had nicked pacer Shoriful while batting on four.

But Bangladesh did not review the caught-behind appeal, which was turned down by the on-field umpire.

New Zealand bowled out Bangladesh for 310 on the first ball of the morning when Tim Southee trapped last man Shoriful leg-before for 13.

The Black Caps then got off to a fast start, the first three balls yielding 10 runs.

Bangladesh's spinners slowly took control to check the initial batting surge.

Taijul dismissed Tom Latham for 21, Nayeem taking the catch at fine leg.

Fellow opener Devon Conway fell to off-spinner Mehidy two overs later after making 12.

Debutant Shahadat Hossain took a brilliant one-handed catch, diving to his right at silly point after an inside edge hit Conway's pad and popped up to the fielder.

Shoriful dismissed Henry Nicholls for 19 after lunch to leave New Zealand struggling at 98-3.

The two-match series is the beginning of a new cycle in the World Test Championship for both teams.