Disclaimer, I'm not a doctor. I'm just an old fart who has lived through a lot.
I have no idea how to handle the temporary pain, but some of the other suggestions here sound good. That's fine, but you need to fix the real problem, lack of strength. I had tremendous back pains on and off for about 7 years. That was until I decided to get off of my butt, and fix it. I started lifting weights. At the time, I didn't know anyone else doing that. I ordered a set of weights mail order and made a weight bench and a (what later became to be known as) power rack. I did good mornings, deadlifts, and (the king of all exercises) squats. After I got up to squats of about 300 pounds, my back pain went away completely. Of course, getting to 300 took me a couple of years of serious once a week workouts, but in the long run, it was well worth it. Now, even at my age, unless I do something stupid (like I did three weeks ago by not drinking enough water for a couple of days in a row before helping my great-niece move), I don't have any back pain. I can still squat 8 plates (for the novices, that's 45 * 8 + my 65# bar = 425), and I don't ever plan on letting up on lifting as long as I'm able. I've seen too many friends that stopped working only to discover that in a few years of sitting around doing nothing, their backs got weaker and they started having pain.