Animation rotating incorrectly when imported in UE4

Hello, I have an animation here made by a contractor which is not rotating correctly when imported into UE4. I’m willing to pay anyone to fix this for me.

Here’s what it looks like in UE4:

Interestingly, the animation works fine when it’s in blender. I also made sure to name the bones the same: