Players heard shots as their bus pulled up to the mosque.
The Bangladesh cricket team narrowly avoided being caught up in a shooting at a mosque in Christchurch on Friday that left several people dead and forced the cancellation of a test match against hosts New Zealand.
The team were on a bus that was pulling up to the Al Noor mosque near Hagley Oval for Friday prayers when the shooting began.
Mario Villavarayen, the team's strength and conditioning coach, said it had been a close call.
"They were on the bus, which was just pulling up to the mosque when the shooting begun," Villavarayen told Reuters via Twitter.
"They are at the ground, they are shaken but good."
A BCB spokesman later told Reuters the team were in lockdown at their hotel.
"All our players are now safe in their hotel which has been cordoned off," the spokesman said. "We have advised the players not to step out.
"Importantly, our players are safe."
New Zealand Police Commissioner Mike Bush said there were "multiple fatalities" while Prime Minister Jacinda Ardern described it as one of the country's darkest days.
NZC said they had chosen to cancel the third test, which was scheduled to start at Hagley Oval on Saturday, after discussions with the Bangladesh board. It was the final match of the tour.
"I spoke to my counterpart in Bangladesh and we agree its inappropriate to play cricket at this time," NZC Chief Executive David White told TVNZ. "It's quite unbelievable really. We are shocked."
White said he had spoken to the liaison officer with the Bangladesh team and the players were "shocked".
Opening batsman Tamim Iqbal said on Twitter the experience had been "frightening".
"Entire team got saved from active shooters!!! Frightening experience and please keep us in your prayers," he wrote.
Mushfiqur Rahim, who missed the first two tests through injury, said the team had been fortunate to avoid the shooting.
"we r extremely lucky," Mushfiqur said. "...never want to see this things happen again....pray for us."
Acts of extreme violence are extremely rare in New Zealand and White said Friday's incident would "greatly affect" the country.
"It's obviously early days in a fairly fluid situation (but) it's something that we as New Zealanders have to look at as well," he said.
"We are shocked an appalled as I'm sure all New Zealanders are."
Cricket teams have previously abandoned tours amid outbreaks of violence.
Sri Lanka's team bus was attacked by gunmen in Lahore during their tour of Pakistan in 2009. Six members of the team were wounded, while six security personnel and two civillians were killed.
Pakistan still host nearly all of their international matches in the United Arab Emirates due to ongoing security concerns.
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. They also abandoned a tour of Pakistan in May 2002 following a suicide bombing outside their hotel in Karachi.