I Was Attacked By Two People Who Burst Their Way Into My Gf's Apartment And At The End Of It All They Charged Me With Battery. I Go To Court This Monday. I Am Terrified And In Disbelief And Really Could Use Some Advice.

The story
I was with my girlfriend at her home when we hear a police like banging on the door. She looks to see who it is and its a guy in a hood and mask. We lock the door and the knocking persists for about 10 minutes along with verbal threats coming from the other side of the door.
My gf, thinking it was someone she knew, opens the door a crack and tells them to fucking leave. That's when they burst in and push her to the side. I stand up and punch the first attacker in the face and he tries to tackle me, resulting me putting him in a head lock while I scream as loud as I can for help.
When i look up to my gf, i see a second attacker, pepper spraying her and my gf begins to defend herself by putting her hands out at the attackers face. They end up on the floor and the attacker chokes her and tried to gouge her eye out. From the injuries left, she pressed hard enough to give my gf a black eye.
I drag the man outside, pull the attacker off my gf and then the attackers try to leave. I stand in the way while i tell my gf to call the cops and the male attacker starts reaching for his backpack. I began fighting him for his backpack in fear he had a weapon. Later on in the investigation we found a box cutter that belonged to him on the floor and I realized how serious the situation was. He dropped it when i punched him and was reaching for it when i had him pinned down. I noticed because i expected him to punch me in the face but his had was all over his pockets.
I take the backpack and hold the man down as i wait for the police.
The police show up, separate us, ask us questions and get everything absolutely wrong, idk if they were trying to test for consistencies in our stories but it amazed me how much i had to break down that people came through the door with hoods and masks, pepper spray, and a boxcutter.
I tell the officer what happened while the air is filled with pepper spray. They get all my info, talk to the attackers, come back and hand ME a charge for battery I have to go to court on Monday for.
I just need some legal advice because it is literally unbelievable to me that people break into my house, I defend myself, and they are able to charge ME for battery.
Im looking for any kind of useful response, I am not familiar with litigation and can't believe I might go to jail for defending my life and my girlfriends life.
[link] [comments]