Rape..

I was dating a guy last year. I was in a really bad place with myself at the time. He said he wanted to have sex and agreed. I pretty much felt whatever because I didn't care about my body. After a while the condom broke and I said I wanted to stop because I wasn't into it and I didn't want him in me anymore and I wanted to leave. He said he didn't want me to and wouldn't let me leave. A few weeks later my friend came with me in hopes he wouldn't try anything and then he did and my friend left and I tried to go with but he didn't want me to. I haven't told many people. Someone told me that since I agreed at first it isn't rape but I said no and I wanted to stop several times on two occasions...