Ford focus Engine Malfuctions?

I have a 2008 Ford Focus 1.6 tdi that all of sudden has lost power while driving on the A45. I had to pull aside and while the engine was still running at minimun the dash has displayed Engine Malfuction and then Brake light out. I could not move the car for over 30 minutes. After that the car has run again like nothing has happened.
Are you aware that due to the brake light out maybe the car has a security function which stop the car from running until you fix the lights?

It could be come kind of electrical malfunction.

Get a cheap OBD-ii unit and list any error codes.
Might be minor, might be a sign of major things to come (and time to offload car…)