New Zealand captain Kane Williamson says defeat to Pakistan is "a tough pill to swallow" following his side's seven-wicket loss in the T20 World Cup semi-finals in Sydney.

The Black Caps suffered another piece of knockout stage heartbreak in a major tournament after they were chased down at the Sydney Cricket Ground with five balls to spare.

Following defeat in last year's T20 World Cup final to Australia, it marks the latest shortfall for New Zealand in competition cricket, having also been edged in the 2019 World Cup final by England in the 50-over format.

Williamson had no qualms in saying their opponents were the better side on the day, Pakistan reaching a target of 153, but after another missed opportunity he acknowledged it was a hard loss to take.

"I thought Pakistan played nicely and then we managed to wrestle back some momentum," he said after Mohammad Rizwan (57) and Babar Azam (53) ended his side's chances.

"We were put under pressure early, they bowled really well.

"It was thanks to an unbelievable knock from Daryl Mitchell we got some momentum back. At halfway, we thought it [152-4] was a competitive total because we knew the pitch was a used surface - it was tough.

"But it's really disappointing to not make Pakistan work harder for those runs. They were absolutely outstanding and credit has to go to them.

"It is a tough pill to swallow. Babar and Rizwan put us under pressure but if we are honest with ourselves, we should have been more disciplined.

"They deserved to be the winners of that game.

"We have played a lot of good cricket, we have stuck to what has given us a lot of success, but today we weren't at our best. We know the fickle nature of T20 cricket."