I had a problem just like this once. It was a muscle spasm in my back that pulled on the back of my rib cage and caused an offset in a spinal vertebra. It was putting extra pressure on a nerve and caused pain radiating down my lower back, and then it moved to my upper back. One half-hour session with a chiropractor fixed it.

Obviously this may not be the same thing as in your case, but it's something to consider.