NEW YORK (AP) — The price of oil rose for a second straight day Friday, but still posted a drop for the week.

U.S. benchmark oil for October delivery gained $1.39, or 1.4 percent, to close at $106.42 a barrel on the New York Mercantile Exchange. Oil rose $1.18 a barrel Thursday. Even with the two days of gains, oil fell $1.04 a barrel this 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 labor 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.

North Sea Brent, the benchmark for international crudes, gained $1.14 to $111.04 a barrel on the ICE Futures exchange in London.

In other energy futures trading on Nymex:

— Heating oil added 3 cents to $3.10 per gallon.

— Natural gas fell 6 cents to $3.49 per 1,000 cubic feet.

— Wholesale gasoline gained 3 cents to $2.87 per gallon.

___

Pamela Sampson in Bangkok and Pablo Gorondi in Budapest contributed to this report.