West Texas Intermediate crude for October delivery gained $1.39, or 1.4 per cent, to close at US$106.42 a barrel on the New York Mercantile Exchange after rising US$1.18 a barrel Thursday.
But even with the two days of gains, oil was down US$1.04 a barrel on the week.
Oil rose after the U.S. government said that Americans cut back sharply in July on their purchases of new homes, a sign that higher mortgage rates may weigh on the housing recovery.
Traders apparently saw the weak data as an indication that the Federal Reserve may need to wait before slowing down its bond-buying program.
Risk premiums linked to the political crisis in Egypt and labour conflicts at key Libyan ports used to ship oil exports also supported crude oil prices.
Egypt controls the Suez Canal and the Sumed pipeline, crucial transport routes between the Middle East and the Mediterranean Sea through which around 4.5 million barrels of oil and refined products are shipped daily.
Brent crude, which sets prices for imported oil used by many U.S. refineries, gained $1.14 to US$111.04 a barrel on the ICE Futures exchange in London.
In other energy futures trading on Nymex, heating oil added three cents to US$3.10 a U.S. gallon (3.79 litres), wholesale gasoline gained three cents to US$2.87 a gallon and natural gas fell six cents to $3.49 per 1,000 cubic feet.
(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)