NEW YORK, Aug 5 (Reuters) - The dollar rallied across the board on Friday after a stronger-than-expected U.S. July payrolls report suggested the Federal Reserve may need to continue raising interest rates for the near term.

The U.S. dollar index, which measures the greenback against a basket of currencies, sharply extended gains following the report, which showed nonfarm payrolls increased by 528,000 jobs last month, the largest gain since February. That was well above expectations by economists.

The dollar index, which remains below its mid-July high, was last up 0.9% at 106.63. It was up about 0.2% just before the report.

"This is a much stronger report than was expected... What it means is the Fed cannot pivot at this point. The Federal Reserve has to continue to hike rates. The folks who are saying let's take it more slowly are being shoved aside here with this report," said Axel Merk, president and chief investment officer at Merk Investment in Palo Alto, California. "The dollar is stronger against almost everything. The U.S. is performing when the general mood is that the world is slowing down."

Against the yen, the dollar was last up 1.7% at 135.20 yen. The Fed last week raised its policy rate by three-quarters of a percentage point.

The U.S. central bank has raised that rate by 225 basis points since March, but investors had been assessing recently whether the Fed might be less aggressive in hiking rates in the future.

The dollar index is up more than 11% for the year so far amid the higher rate hike outlook.

Sterling was down against the dollar by 0.9% at $1.2053, a day after the Bank of England (BoE) raised rates by the most in 27 years to fight surging inflation, but warned a long recession was coming, beginning in the fourth quarter of this year.

The euro was down 0.7% against the greenback at $1.0174. In cryptocurrencies, bitcoin last rose 3% to $23,293.01. 

(Reporting by Caroline Valetkevitch; additional reporting by Samuel Indyk in London and Rae Wee in Singapore, editing by Ros Russell, Angus MacSwan and Susan Fenton)