Israeli Prime Minister Ehud Olmert Tuesday warned Palestinian militants that Israel will respond militarily if they continue attacks from the Gaza Strip in violation of a truce .