1996 Subaru uphill power loss

I have a 1996, 2.2L manual Subaru Legacy with about 150,000 miles. I recently began having trouble on sustained hills at highway speed…it would lose power, and the check engine light would flash and then stay on. I’ve noticed this tends to happen more if my A/C is on. Any suggestions about where to look? Could it have anything to do with my incredibly old battery?

No its not your battery. Your engine is misfiring and if you continue to drive it while the light is flashing you will turn what may be a simple problem into a bad and much more expensive one.

Go to a major chain auto parts store such as Autozone and have them read the codes. Write down the exact codes (such as P1234) and post them here.

Also post your maintenance history. How old are those plugs & wires? Fuel filter? Air filter? Etc.

It’s not the battery. But if it is original, they only really are good for five years.
And maybe on a car with 150,000 miles you could climb long hills without the luxury of air-conditioning.
The most likely answer is the fuel pump is going. They don’t just fail all at once.

How long since last fuel filter change? You should hope it’s only a filter, the fuel pump is more expensive.

I don’t know if the Subaru uses a matrix type catalytic converter but if it does the matrix can break up and fall to the rear going up hill and clog the exhaust.Go under your car with the engine cold and hit the converter upward with the side of your fist or a rubber hammer, If the matrix has broken you will hear the pieces rattling or rustling.

Sluggish running and loss of power is usually caused by:
Low fuel pressure.
Clogged catalytic converter.
Engine getting weak; the compression going down.

The first thing I would do, and the easiest, is to use a vacuum gauge and check for the possibility of a clogged converter. This only takes a minute and does not require diassembly of anything.

I should have added that a vacuum gauge will also let you know if the engine is getting weak.