There is no reason why God cannot be both just and merciful. Seemingly, the two concepts contradict one another, but I believe that one can resolve this conflict by considering the following: God's mercy is just, and his justice is merciful.
Assuming the omnipotence of God, mankind cannot feasibly imagine the worst punishment possible on His scale of intensity. Justice for transgressions would involve punishment relative to that transgression, as it would be unjust and unreasonable to punish one too harshly. This justice is an eternal construct in life, because God initiated life and, therefore, the boundaries of justice. It is this ability to shape the definition of 'just' that gives God the ability to simultaneously be just and merciful. Our human understanding of a universal code of justice is constrained by our interactions, apparent of otherwise, with the Almighty. Justice from God is doled out from high and is eternal, but it is not final. If the afterlife is eternal, then there is a continuous timeline of interactions with God, allowing for a multitude of action/consequence situations. It is out of our grasp to definitively say what happens after our earthly consciousness, then is is not possible for humankind to definite leg say whether God 'changes his mind' along this continuum. This uncertainty is, at its heart, mercy.
God's mercy is essentially God's forgiveness of transgressions. Mercy and justice go hand in hand, because in order to be merciful, there must have been an initial punishment which can be overturned or the slate otherwise wiped clean. God's mercy is a Presidential pardon in the 11th hour. Justice may have been sought and found, but mercy is allowing that individual to pass judgement unscathed; at least unscathed relative to the awesome power of this omnipotent God. If God created all, then there is simply no way to understand the breadth of His power so, on the scale of power of an omnipotent all-seeing God, a merciful judgement...