The dog's penis is normally ensheathed in the prepuce. Swelling is normal during sexual excitement. The penis will become erect and will extrude from the prepuce. This is caused by engorgement of erectile tissue with blood. If the penis cannot be retracted into the prepuce this is called Paraphimosis. This is an emergency medical condition and requires immediate treatment. It is normally associated with erection or copulation. Sometimes hair can become entangled around the penis preventing retraction. It can also occur after injury, or in the presence of a foreign body, cancer, genetic malformation or inflammation.