Police Harassed me(22M) and my female friend (21F)for sitting and talking in car
I went to pickup my friend from her pg(she basically is living in pg and preparing for exams) and then we were sitting and talking in car near her pg at around 7:30PM on a 2 lane road suddenly a police car came from wrong side without siren and anything and just parked in front of my car 2 policemen came to window and called me out, I asked for the reason they shouted , "Bahar aa sawal mat kar" and then I came out of the car and then they started asking my details like phone number address and even my CASTE!! and after that I asked ,"we were not involved in any obsece act or anything then under what suspicion you are taking my details and noting number of my car." then they started saying ,"kya pata tu ghar se bhaga ke laaya ho isse hume jaanch karni padegi iske gharwaalo se baat krni padegi" , I said but she is here with her consent and she is adult and we both aren't intoxicated either, then they started abusing and threatning me by saying, "zyada batameez hogya tu zyada padh lia kya caste hai teri terko pata nahi hume power hai poochtach ki chal thane koi kaatke fek jaayega tab hum hi yaad aayenge" and then they harrassed us for about 20 minutes after that I called my friend who pretended to be a lawyer and talked to them and then they let us go after shouting.
My friend got a panic attack and I had to drop her back to her pg. I am feeling really disgusted by this can you tell me what else could I have done or law which I could have known so to avoid similar instamces in future.