Hip Pain: Hurt Back or Tight Hips?

I was doing squats a few days ago and twinges my back. It wasn’t that bad, i stretched out and everything felt better. I went to do squats today and during my warm up it hurt again, so i racked the weight. I tried to stretch it out but whenewhenever i try my hips are on fire. Does my back hurt because my hips are tight or is it just a side affect of my back hurting?

One of the brains will answer this but they will need to know:
Where it hurts.
How it hurts.
When it hurts.
What makes it feel worse.
What makes it feel better.

I’m about 3 IQ from neanderthal but I may have suggestions with more info.

It hurts in my lower back, and sometimes along the outsides of my legs to my knees. It hurts when I bend over (like to touch my toes) but doesn’t hurt when I am standing or sitting upright.
Stretching my hamstrings takes a little pressure off but not much. Right now nothing truly makes it feel better, but having good posture does take the pain away

Not sure what you are doing before squats/deads but I suggest:
two quick sets each of:
leg curls (hams)
knee raises (core)
side bridges (QLs)
glute bridges (low back and ass)
It won’t take but 5 or 6 minutes.

If it persists, obciously see a dr or pt.
Lots of good info on youtube AthleanX.
Search “AthleanX back pain”.

Over the past few days I’ve taken a lot of time to stretch and work everything out. It’s getting better day by day, so maybe I just set my squat up wrong and now it just needs some time to recover. I have legs tomorrow, but I’m definitely not doing squats. My workout will look similar to what you typed out