Which companion of the Prophet (PBUH) was known for his knowledge in Islamic law and served as a judge?

A. Ali ibn Abi Talib
B. Umar ibn al-Khattab
C. Abu Hurairah
D. Zayd ibn Thabit

Answer: Zayd ibn Thabit


Additional Information: Zayd ibn Thabit was known for his expertise in Islamic law and served as a judge and a key figure in compiling the Quran.