Get the K20D if you're into outdoors photographing, since it has some great weather sealing. The D5000 has better noise performance, a bit better image quality, and a tiltable screen.
ISO performance yes, but the K20D's detail is unbeatable in its class
That's because they apply more sharpening by default, you can easily set the D5000 (or any other camera) to the same sharpening settings
Detail is not the same as sharpening. You can't sharpen detail that isn't captured, although to be fair, the D5000 is no slouch either.
Considering the K20D came out a year ago at $1200 and now is $700, I'd say that is one heck of a value. Sadly, I learned that the 3-year warranty expired just a few days ago.
Sigh*, if only I had a couple more $$$ on me, I woulda picked up one...
Samsung GX-10, , SA 18-55mm
Canon 5D Mark II, 40D, EF 17-40mm f/4 L, EF 24-105mm L IS, EF 50mm f/1.4