A key Israeli ultra-Orthodox religious party has agreed to join forces with Prime Minister Ariel Sharon , clearing the way for a unity government needed to push through Israel 's planned withdrawal from the Gaza Strip .