In really low light levels the K200D isn't too good at autofocusing.
If it's really dark there wont be enough light for the autofocus sensor to see anything to focus on, even though you might be able to see it just fine with your eyes. The symptom is that the K200D will hunt back and forth trying to find something for AF to lock onto. The flash can and will also strobe in an attempt to provide light for the AF sensor...
So if it was really dark, I would expect this behaviour - I have seen it before. The remedy is to either manually focus or put your camera on a tripod.
p.s. - Welcome from another Perth AUS Pentaxian