A few days ago, I was playing on Kyne and I couldn't find a group, so I was doing solo scouting missions. I was on my way back when my compass showed a castle under attack. My alliance had been going after this place off and on all week, so I naturally assumed my alliance was attacking. When I arrived at the castle, I saw a large group at the main gates which was pretty far off, and I figured it was just a matter of time before they would be inside. I decided to make a diversionary attack, and set up a some siege engines around the corner from the main attack. Turns out my trebuchet had the range to attack a defender's ballista, but they couldn't reach me. I kept my trebuchet on the ballista and then had a couple ballista going after a postern door. Running three siege engines takes concentration so I wasn't paying a lot of attention to the attacking group. Eventually the main wall collapses and the two armies met in the gap. I lobbed a couple more shots from my trebuchet into the gap, then dismantled my engines and headed to the gap for melee attacks. During this whole attack I could see that I was getting a few kills and doing a lot of damage, and I had kept several defenders busy far away from the main attack. I even got 6 DK for my bounty, so I was happy.
I got inside and tried to heal whoever needed it, but my heals weren't working. A split second later I am dead. No big deal, grand melee battle and I'm a squishy so it happens a lot, I just wait a bit for resurrections or port back to the Gates. No one was trying to rezz me, then I saw what was wrong. My alliance was nowhere to be found. The attackers were not from my alliance.
I had helped the bad guys attack the other bad guys. On the other hand, I did get 6 DK kills out of it.
TL;DR: always know who you are helping and who you are attacking.