NEW YORK (Reuters) - Oil prices finished the week at a gain after a big Friday rally, and U.S. stock indices ended flat-to-higher, to close a bumpy week on a high note.

Crude prices had been on track for a weekly loss, but spiked on Friday as energy investors looked to cover short bets ahead of a televised interview Sunday by the U.S. news program “60 Minutes” with Saudi Arabia’s Crown Prince Mohammed bin Salman.

The prince will be “comparing Iran’s Ayatollah to Hitler, and the battle in Ghouta, Syria, is ramping up,” said John Kilduff, partner at investment manager Again Capital in New York. “You can’t be short oil over the weekend with all that going on in the region.”

U.S. crude CLcv1 rose 1.72 percent to $62.24 per barrel and Brent LCOcv1 was last at $66.12, up 1.54 percent on the day. During the session, Brent hit $66.42, its highest since Feb. 28.

Gains on Wall Street also supported crude futures, which have recently been moving in tandem with U.S. stock indices.

The S&P 500 .SPX, which was down 1.5 percent on the week through Thursday, avoided its first five-day losing streak of 2018, gaining 4.68 points, or 0.17 percent, to 2,752.01.

The Dow Jones Industrial Average .DJI rose 72.85 points, or 0.29 percent, to 24,946.51, while the Nasdaq Composite .IXIC added 0.25 points, or 0 percent, to 7,481.99.

Wall Street nevertheless posted losses for the week, as shares struggled to weather a growing sense of turmoil in U.S. President Donald Trump’s administration and signs that protectionist policies could spur a trade war.

Those fears took a back seat on Friday to economic data showing U.S. factory output jumped 1.1 percent in February.

A pumpjack is seen behind a vineyard near Zistersdorf, Austria, October 2, 2017. REUTERS/Heinz-Peter Bader

“Today, there are not a lot of headlines out of Washington, so the focus is more on the economy,” said Keith Lerner, chief market strategist at SunTrust Advisory Services in Atlanta.

Energy led the S&P with a 0.9 percent gain amid the spike in oil prices.

Retailer Walmart Inc WMT.N added 1.9 percent, and Home Depot Inc HD.N half a percent, after the University of Michigan's preliminary reading of consumer sentiment index rose more than expected to 102.0.

Both of those gains were down, however, from higher climbs earlier in the day.

European shares lost ground for the week, despite a modest gain on Friday, driven by exchange operator NEX Group Plc's NXGN.L 30-percent jump after a takeover offer from U.S.-based peer CME Group Inc CME.O.

The pan-European FTSEurofirst 300 index .FTEU3 rose 0.29 percent and MSCI's gauge of stocks across the globe .MIWD00000PUS was about flat.

U.S. Treasury yields rose on the industrial data, and in anticipation of next week’s Federal Open Market Committee meeting, at which the U.S. central bank is expected to raise interest rates for the first time this year.

Benchmark 10-year notes US10YT=RR last fell 6/32 in price to yield 2.8445 percent, from 2.824 percent late on Thursday.

The 30-year bond US30YT=RR last fell 10/32 in price to yield 3.077 percent, from 3.061 percent Thursday.

The economic data, which bolstered the consensus expectation of a rate hike, also pushed the dollar up slightly against a basket of six currencies, with the dollar index .DXY rising 0.08 percent. The euro EUR= fell 0.15 percent to $1.2286.

But fears of political tensions did not disappear entirely, boosting the safe-haven Japanese yen, which strengthened 0.29 percent versus the greenback at 106.05 per dollar.

The dollar had earlier fallen as low as 105.61 against the yen, the lowest since March 7.

Sterling GBP= was last trading at $1.3944, up 0.06 percent on the day.1.3944rising 0.08 percent

Euro zone bond yields kept falling after another European Central Bank policymaker warned that inflation in the bloc remained sluggish, a potential hurdle to the withdrawal of monetary stimulus.