The violence began late Saturday and continued until early Sunday, said Nojibul Islam, a police chief in the coastal district of Cox's Bazar.
He said the situation was under control Sunday afternoon after extra security officials were deployed and the government banned public gatherings in the troubled area.
He said at least 20 people were injured in the attacks that followed the posting of a Facebook photo of a burned copy of the Quran. The rioters blamed the photo on a local Buddhist boy, though it was not immediately clear if the boy actually posted the photo.
Bangladesh's popular English-language Daily Star newspaper quoted the boy as saying that the photo was mistakenly tagged on his Facebook profile. The newspaper reported that soon after the violence broke out, the boy's Facebook account was closed and police escorted him and his mother to safety.
Joinul Bari, chief government administrator in Cox's Bazar district, said authorities detained the boy's parents and were investigating.
Buddhists make up less than 1 percent of Muslim-majority Bangladesh's 150 million people.