There are a few possibilities as to why it fired as you closed it (which is not a slam-fire in the strictest sense of the word). One, as you suspected, you may have held the trigger back as you closed the action, although if you did this and did not notice you are not paying attention, because you really have to try to do it (go ahead, try it with the gun unloaded, you will see what I mean). Another way, as goatwhiskers suggested, the striker may be stuck forward (possible but not likely IMO, as the gun cocks by the trigger nose catching the striker and drawing it back as the action is closed). And lastly, and most likely IMO, is that the striker sear section or trigger nose is worn or someone tried to do a trigger job on your rifle and carved away too much metal, and now the striker falls off as the action reaches the fully closed position. I have seen this numerous times (and surprisingly, it was always "a friend" who tried to slick up the trigger
). If it is this last situation, you really need to have someone familiar with 99s look at it to determine how to fix it.