At least one gunman killed 49 people during Friday prayers at two mosques in the country's worst ever mass shooting.
Mario Villavarayen, the team's strength and conditioning coach, said it was a close call.
"Their bus was just pulling up to the mosque when the shooting began," he said. "They are shaken."
"When any foreign team comes to our country, we always ensure proper security," he said.
New Zealand Cricket said they had chosen to cancel the test, which was the final match of the tour, after discussions with the BCB.
"Arrangements are being made for the return of the Bangladesh team home as soon as possible," NZC said in a statement.
New Zealand abandoned their 1987 tour of Sri Lanka following a bombing near their hotel in Colombo in which more than 100 people were killed.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)