Greetings, sorry about the pain.
You are moving towards being less flexible. Not to worry this can be reversed.
Next Steps
try hamstring stretching twice a day and ice the area. twice a day, continue this for copula of days to see better results.
Health Tips
if you got your pain relieved with above then later seek a physio assist to get some strength program for permanent solutions.