NEW YORK (Reuters) - Rising shares of energy and technology companies helped global stock markets regain ground on Tuesday, a day after a mounting trade fight pummeled equities, while oil surged more than 2 percent as Washington lobbied against Iranian crude imports.

Wall Street closed higher, aided in part by energy shares that soared after a senior U.S. State Department official said Washington was telling its allies to stop importing Iranian crude oil.

“Yes, we are asking them to go to zero,” the official said when asked if the United States was pushing allies, including China and India, to cut oil imports to zero by November.

The Dow Jones Industrial Average rose 30.31 points, or 0.12 percent, to 24,283.11, the S&P 500 gained 5.99 points, or 0.22 percent, to 2,723.06 and the Nasdaq Composite added 29.62 points, or 0.39 percent, to 7,561.63.

Tech stocks rebounded from a sharp sell-off on Monday, after U.S. government officials said plans were in the works to block firms with at least 25 percent Chinese ownership from buying U.S. companies with “industrially significant technology.”

Apple Inc, which rose 1.2 percent, snapped a three-day losing streak.

Stocks were also propelled upward by shares of consumer discretionary companies and by General Electric Co, whose shares rose 7.8 percent after the company said it would spin off its healthcare business and divest its stake in oil-services company Baker Hughes.

A basket of European stocks also got a reprieve. The pan-European FTSEurofirst 300 index rose 0.09 percent and MSCI’s gauge of stocks across the globe gained 0.08 percent, after Asia had extended a sell-off that wiped $1.5 trillion off world stocks.

Despite the modest gains, investors remained wary.

FILE PHOTO: Traders work on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., June 25, 2018. REUTERS/Brendan McDermid

“We’re still in a tug-of-war between daily twists and turns of a potential trade war and the reality of a strong underlying U.S. economy,” Brent Schutte, chief investment strategist at Northwestern Mutual Wealth Management Co, said.

Escalating trade tensions between the United States and China, as well as Washington and Europe, had led two benchmark Wall Street indexes on Monday to suffer their biggest losses in more than two months and launched China into bear market territory, with its major stock indexes down 20 percent from January peaks.

After seeing a surge in buying on Monday, U.S. Treasury debt yields edged higher as concerned lingered that trade tensions could hurt economic growth, though safe-haven buying was capped on anticipation of more interest rate hikes from the Federal Reserve.

Gold hit its lowest in over six months as the selloff in global risk assets eased and it remained under pressure from the prospect that rising U.S. interest rates will further support the dollar.

Oil prices, meanwhile, soared after the U.S. official said the government was pressuring allies to halt Iranian crude imports.

“We’re going to isolate streams of Iranian funding and looking to highlight the totality of Iran’s malign behavior across the region,” the official, speaking on condition of anonymity, told reporters.

Benchmark oil prices jumped over 2 percent and U.S. crude topped $70 a barrel for the first time in two months

Brent crude gained 2.6 percent to trade at $76.68U.S. light crude rose 3.8 percent to $70.68.

News that Saudi Arabia plans to pump up to 11 million barrels of oil in July, the most in its history, was outweighed by the renewed Iranian supply concerns, traders said.

In currencies, the dollar rose across the board as global trade tensions prompted traders to ditch most high-yielding currencies and investors focused on expectations the Federal Reserve will continue to raise interest rates.

The dollar index rose 0.43 percent, with the euro down 0.49 percent to $1.1645.

The Japanese yen weakened 0.25 percent versus the greenback at 110.07 per dollar, while sterling was last trading at $1.3219, down 0.41 percent.