"had rained" or "was raining"?

When I woke up last night, it was raining heavily.

This means that it was still raining (drip, drip, drip) when you woke up. You could hear the rainfall outside the window.

When I woke up last night, it had rained heavily.

This means that it rained for some time, and then it stopped, and it wasn't raining for some time, and then you woke up.

Neither answer is incorrect, even though the second one sounds a bit awkward without a suitable context.


When I woke up last night, it ________ heavily. (rain)

a. was raining

b. rained

c. had rained

Grammatically speaking, I think all three are possible.

a. means that it had started raining before I woke up, and it continued raining after I woke up.

b. could mean the same as a., but it would normally mean that it started raining right after I woke up.

c. means that it had started and stopped raining before I woke up. Without further context, though, c. could sound weird because normally you wouldn't know whether it had rained heavily or not since it had only rained while you were sleeping.