Bangladesh team were "50 yards" from one of the mosques targeted by the attacker who also broadcast live footage on Facebook of the massacre, officials say.
Bangladesh's cricket team escaped unscathed after terror attacks at two mosques in New Zealand killed 49 people, an official told AFP news agency on Friday.
The Bangladeshi team were visiting Christchurch for the final Test of a three-match series against New Zealand and arrived at one of the city's mosques for prayer when the shooting began.
Bangladesh Cricket Board spokesman Jalal Yunus said most of the team were bussed to the mosque and were about to go inside when the incident happened.
'They are mentally shocked'
"They are safe. But they are mentally shocked. We have asked the team to stay confined in the hotel," he told AFP.
Opening batsman Tamim Iqbal wrote on Twitter, "Entire team got saved from active shooters!!! Frightening experience and please keep us in your prayers."
"Alhamdulillah Allah save us today while shooting in Christchurch in the mosque," tweeted another player, Mushfiqur Rahim.
"We r extremely lucky...never want to see this things happen again....pray for us."
Shrinivas Chandrasekaran, the team's high performance analyst, posted: "Just escaped active shooters!!! Heartbeats pumping badly and panic everywhere!!"
Mazhar Uddin, a reporter for Bangladesh's Daily Star who is traveling with the team, said they were told a shooting was going on when they arrived at Christchurch's Al Noor Mosque.
"The distraught Bangladesh players got inside a bus and laid down on the floor after the warning," he reported.
Bangladesh's team were "50 yards" from the mosque, team manager Khaled Mashud said.
"If we had reached the mosque three to four minutes before, then it would have been a massive incident," he said.
Nineteen members including all the 15 players of the Bangladesh National Team and supporting stuff are expected to reach Dhaka at 22h40 tomorrow (Saturday).— Bangladesh Cricket (@BCBtigers) March 15, 2019
Every team has to be alerted
Meanwhile, Bangladesh cricket board head Nazmul Hassan urged cricketing authorities across the globe to change the perception about security.
"We have always maintained that this kind of incident can happen to any country. Every country has to be careful. Every team has to be alerted," he said.
Australia's cricket team boycotted a tour in Bangladesh in 2015 citing a lack of security.