One quality that the Lord exhibits and encourages is mercy. We are commanded to be merciful: "What doth the Lord require of thee, but to do justly, and to love mercy, and to walk humbly with thy God?" (Micah 6:8). One eternal principle seems at odds with mercy - justice. However, justice and mercy are usually mentioned together even though many times they seem like they are mutually exclusive of each other. On the surface, it does not seem possible for someone to be both just and merciful.
In the book of Alma we find one of the most clear descriptions of the interplay between justice and mercy. We learn that justice must be served - it is an eternal law that cannot be broken: "Now the work of justice could not be destroyed; if so, God would cease to be God.... Do ye suppose that mercy can rob justice? I say unto you, Nay; not one whit. If so, God would cease to be God." (Alma 42:13,25). However, we know that God is both just and merciful. Justice must be fulfilled but God provided a way for justice and mercy to be served: "And now, the plan of mercy could not be brought about except an atonement should be made; therefore God himself atoneth for the sins of the world, to bring about the plan of mercy, to appease the demands of justice, that God might be a perfect, just God, and a merciful God also" (Alma 42:15). The Great Lawgiver, even the Lord Jesus Christ, offered himself as a merciful sacrifice so that justice would be fulfilled. The great Book of Mormon teacher, Jacob, younger brother to Nephi, called the Plan of Salvation the "merciful plan of the great Creator" (2 Ne. 9:6). The Plan of Salvation is really the Plan of Mercy. It is the way prepared for us to be able to return to the presence of God and be like His Son Jesus Christ. None of us can return on our own, we all fall short, but the Lord is merciful and provided a Way.