If someone threatens you or assaults you, Maryland law does allow you to defend yourself. In fact, self-defense is a very common reason for what would otherwise be aggressive behaviors. In many altercations, one person will legitimately claim that they did not instigate anything, they never wanted to have the confrontation and they were just trying to protect themselves.
However, even self-defense laws come with restrictions. In Maryland, when someone is not in their own home, they have a duty to retreat before defending themselves. This is only obligatory when it is reasonably possible, so someone who sees no immediate way out doesn’t have to refrain from defending themselves while looking for one. But, if it is clearly a situation where a reasonable person could have just walked away, there is an obligation to do so.
What if you are in your home?
As noted above, that law only applies when you are outside of the home. Inside the home, there is no duty to retreat. You always have a right to defend yourself, your home and your family. It is wise to contact the authorities and try to avoid a confrontation, of course, but you do not have to retreat.
The only major restriction when you are in the house is that the force must be reasonable. If you feared for your life, you can use deadly force. But you cannot respond with excessive force if you are not actually in danger yourself. This can create a rather confusing gray area in the law, which is why it’s so important to know about all of the legal options that you have.