Have you ever been petting a seemingly happy cat when, with no warning, she turns and swats at you, or tries to bite? The truth is, she probably was warning you, but you just didn’t understand the signs.

Just like people, cats give off subtle signs through their body language. Knowing how to interpret those signs can help you and your cat live a more harmonious life.

Petfinder shares examples of how a cat gives us clues to her mood. One way is with her tail. A cat walking toward you with a raised tail generally means the cat is happy and comfortable with you. A tail that is down and close to the body is usually an indication that the cat is frightened or feels threatened.

Unlike dogs, when a cat “wags” her tail, it doesn’t mean she’s happy. A slow movement from side to side often happens when a cat is assessing the situation and hasn’t made up her mind. Give her time. If her tail is swiping or twitching quickly, she is annoyed about something so you probably want to leave her alone.

Looking at a cat’s ears is also a good way to interpret mood. When a cat is happy and relaxed, her ears will be up and slightly forward. Nervous cats will have their ears back. If the ears are flat and close to the head, that cat is frightened and ready to defend herself. It would be best to leave her alone.

In general, a cat that is happy and comfortable will show relaxed and open body language, but a cat that is frightened or angry will be more closed off, pulling the tail and ears close into the body. Of course, if her tail is puffed up, back is arched, and ears are pulled back, leave her alone. This means she feels threatened and is trying to appear larger and more intimidating, ready for a fight.

So what about that friendly cat that swats at you with no warning? Many cats like to be pet…to a point. Then they become over-stimulated and the petting becomes unpleasant. If you feel a cat’s skin begin to ripple or she pulls away from your petting, she is telling you she is uncomfortable. If you don’t stop, she may swat at you—a clear sign telling you that she has had enough.

Once you begin to notice these hints, you will realize that cats really are communicating with you and you can respond appropriately, creating a better relationship for you both.