D. To unify different groups under a single set of laws.
Hammurabi's Code is a set of laws that were created by King Hammurabi of Babylon in ancient Mesopotamia, around 1754 BC. The code was written on a stele, or large stone monument, and it consists of 282 laws that covered a wide range of topics, such as property rights, trade, and family relations. The main purpose of Hammurabi's Code was to unify different groups of people under a single set of laws, which were intended to provide a sense of order and justice in the kingdom. These laws were also used to protect the rights of citizens, particularly the weak and vulnerable, and it helped to create a sense of social stability and order in the ancient Babylonian society.