It is narrated from Sayyiduna Ali (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) used to see a funeral, he would stand up, so we would also stand up. Later, he began to remain seated, so we also began to remain seated.