Most men have an occasional episode of being unable to get and keep an erection. This can be caused by:
However, if you frequently have erection problems, you could have erectile dysfunction (ED), also known as impotence.
ED is when you regularly can't get and keep an erection. It may only happen in some situations – for example, you may be able to get an erection when masturbating, but not when you're with a partner.
If you think you have symptoms of ED, it's important to see your GP or go to a genitourinary medicine (GUM) clinic. They can assess whether you need any treatment.
Read more about erectile dysfunction.