Hm, was it like a cramp, spasm? It could be urinary stone in the urether.
You are male/female, age?
I had this exact same pain and I went to a GI doctor for it. She thinks I have either gastritis or gastric ulcers. That might be what you have also. You could try some over the counter antacids and see if it helps. Mine got so bad they no longer helped. Hope you get some answers!
Pain from urinary stones may be in the kidney area (in the back, on the side, below the rib cage, and if stone goes down the urether, you can feel the pain on the front side, anywhere down to the groin.
Urine test can show if there are stones in your urinary system or not.
Pain on the left side of the trunk may be from spleen. Doctor can examine, if your spleen is enlarged.
If you feel bloated (have extended stomach) and you pass a lot of gas, than it's possible that gas was trapped in your colon and caused pain.