Was it rape?

Several years ago I was going through a rough stage as a teenager, I was sleeping around with strangers. It was a mess. I was a mess.

I invited this guy over for sex. We we're having sex it was going good. He had asked if I would be into doing anal before he came over and I had said maybe.

He decided to go ahead and do anal. I asked him to stop several times, that it hurt and he said "just wait I'm almost finished"

My husband tried to have anal, with my consent, and I just start crying everytime we try.. so we don't try anymore.

I just want to know if it was rape since I invited him over for sex and that it was anal?