Sex after miscarriage??

Elaine.
So I me & my SO had sex for the first time since a few days before the miscarriage... I hadn't bled in 2 days. But it was so painful... Then started bleeding bright red... Anyone know why? Is this normal?