* U.S. 10-year bond yield tops 3 pct
* Walmart falls on Flipkart deal, weighs on Dow
* Oil prices at highest levels since 2014
* Indexes up: Dow 0.67 pct, S&P 0.82 pct, Nasdaq 0.69 pct (Updates to early afternoon)
By Sruthi Shankar
May 9 (Reuters) - U.S stocks advanced on Wednesday as a surge in oil prices boosted energy stocks following President Donald Trump's decision to withdraw the United States from a nuclear deal with Iran.
Oil hit its highest level in 3-1/2 years as investors worried that Trump's decision would increase risks of conflict in the Middle East and curtail oil supplies in a tight market.
The energy index, which rose 2.4 percent, has far outperformed other main S&P sectors in the quarter, with a 12 percent gain.
"There's a bit more of a risk appetite coming into the market today," said Shawn Cruz, senior trading specialist at TD Ameritrade in Chicago.
"The rise in oil is helping energy sector, which is expected to be a pretty big growth sector. A lot of analysts are expecting strong earnings as oil rebounds, and that hasn't really played out so much early this year."
At 12:50 p.m. ET, the Dow Jones Industrial Average was up 163.06 points, or 0.67 percent, at 24,523.27, the S&P 500 was up 21.91 points, or 0.82 percent, at 2,693.83 and the Nasdaq Composite was up 50.07 points, or 0.69 percent, at 7,316.98.
The growth sectors including technology, financials and industrials were all higher, with only the defensive utilities and telecoms in the red.
But worries that rising oil prices will perk up inflation lingered.
The U.S. 10-year Treasury yield rose to a two-week high and above the key 3 percent level on expectations of higher interest rates.
"Oil is probably not helping, it's a kind of a potential inflation indicator," said Mark Travis, chief executive officer of Intrepid Capital Funds in Jacksonville Beach, Florida.
"The underlying challenge for the financial markets is not so much whether Trump does or doesn't do anything. It is the impact of the rates rising facing an expensive capital markets."
Among stocks, Walmart fell 3.3 percent after the retailer took a majority stake in Indian e-commerce firm Flipkart for about $16 billion.
Walt Disney dipped 1.6 percent despite reporting a quarterly profit above Wall Street estimates.
Advancing issues outnumbered decliners by a 1.47-to-1 ratio on the NYSE. Advancing issues outnumbered decliners by a 1.47-to-1 ratio on the Nasdaq.
The S&P index recorded 32 new 52-week highs and 10 new lows, while the Nasdaq recorded 129 new highs and 44 new lows. (Reporting by Sruthi Shankar in Bengaluru; Editing by Anil D'Silva)