This pistol is one of a few surviving examples of wartime Mauser P38 pistols which were re-used by the Bavarian Bereitschafspolizei in the early post war years. Most of these pistols were eventually destroyed and replaced with new material, as the allies had agreed not to rearm the German services with German-made pre-1945 equipment.
The marking 'ÜW BBPol(s)' means:
Übungswaffe Bereitschaftspolizei Bayern (schussfähig).
which rougly translates into:
Trainingsweapon Bavarian Support Police (shootable).