Officials say the tens of thousands of mourners dispersed peacefully after the funeral .