Difference between 'must have happened' and had to have happened/ for Alan

Could you tell me what the precise difference is between these two sentence:

The murder must have happened, after I left his flat.
The murder had to have happened, after I left his flat.

Is there much difference in meaning? In both sentences, I see logical deduction.

Please help me.
Thanks

Yes, the meanings are the same. The first sentence is the standard usage, with ‘must’ for deduction, but ‘have to’ is gradually replacing ‘must’ in many of its uses.

There should be no comma after ‘happened’.