Benchmark crude ended the trading day up 90 cents to $88.28 a barrel on the New York Mercantile Exchange.
Brent, which is used to price international varieties of oil, was up 83 cents to $111.38 a barrel.
Friday's killing is the first violence since a truce between Israel and the militant Hamas group was reached two days ago. Prior to the shooting, oil prices had been falling, thanks mostly to optimism over the stability in the region that the cease-fire agreement provided.
Israel launched an offensive on Nov. 14 to halt rocket fire from Gaza, unleashing some 1,500 airstrikes on Hamas-linked targets, while Hamas and other Gaza militants showered Israel with just as many rockets. The truce reached Wednesday had eased fears of a war that could broaden beyond Gaza and eventually disrupt oil supplies.
Paul Tossetti, senior director of markets and country strategies at PFC Energy, said prices were linked to the action in Gaza but that he expects this to be a temporary bump and that the cease fire would ultimately hold.
"I expect the market might back away from those concerns," he said.
Traders are also looking ahead to the next meeting of the Organization of the Petroleum Exporting Countries on Dec. 12. Tossetti said OPEC has been maintaining high levels of production but he doesn't expect anything to change at the upcoming meeting.
"It will probably be a non-event and a non-event for prices," he said.
Other futures on the New York Mercantile Exchange:
— Wholesale gasoline lost nearly 6 cents to end at $2.7439 a gallon.
— Natural gas lost 0.2 cents to end at $3.901 per 1,000 cubic feet.
— Heating oil was up 5 cents to end at $3.0771 a gallon.
(TSX:ECA, TSX:IMO, TSX:SU, TSX:HSE, NYSE:BP, NYSE:COP, NYSE:XOM, NYSE:CVX, TSX:CNQ, TSX:TLM, TSX:COS.UN, TSX:CVE)