U.S. stocks rose in midday trading today, after the Standard & Poor’s 500 Index had its best day in five months, amid optimism that tension between Russia and Ukraine will ease and American airstrikes will push back militants in Iraq.

MannKind Corp. surged 9.4 percent after Sanofi agreed to pay the drugmaker as much as $925 million for rights to the world’s only available inhaled insulin. Kinder Morgan Inc. rallied 9.7 percent after announcing plans to consolidate its energy businesses. Priceline Group Inc. rose 3.1 percent after reporting better-than-forecast second-quarter bookings. Dean Foods Co. fell 6.4 percent after withdrawing its full-year profit forecast amid a volatile dairy market.

The S&P 500 gained 0.6 percent to 1,942.24 at 12:29 p.m. The Dow Jones industrial average climbed 56.96 points, or 0.3 percent, to 16,610.89 today. Trading in S&P 500 stocks was 12 percent below the 30-day average at this time of day.

“There is some sense that geopolitical risk out there is waning, or at least the situation is better than the belligerent talk that was coming out in middle of last week,” Bill Schultz, who oversees $1.2 billion as chief investment officer at McQueen, Ball & Associates in Bethlehem, Pennsylvania, said in a phone interview. “We’re at lower levels than we were two weeks ago, so there’s a better entry point if you look to add stocks to your portfolio.”

The S&P 500 advanced 1.2 percent on Aug. 8 to erase declines in the previous four sessions, after reports indicated Russia intended to de-escalate the conflict in Ukraine and had ended military exercises held since Aug. 4 near its border with the country.

In the Middle East, U.S. jets and drone aircraft hit Islamic State fighters in multiple attacks in Iraq, while Israeli and Palestinian negotiators staked out positions for a long-term agreement on the Gaza Strip amid a new Egyptian- brokered truce.

Nine out of 10 of the main S&P 500 groups advanced, with producers of consumer staples and industrial products rallying at least 0.9 percent for the biggest gains. Sysco Corp. added 3.5 percent after reporting results.

Intel Corp. jumped 1.6 percent for the biggest gain in the Dow, while Micron Technology Inc. rose 2.2 percent to lead semiconductor shares higher.

MannKind surged 9.4 percent to $8.89. Sanofi will take 65 percent of any profit or loss related to sales of the drug -- Afrezza -- while MannKind will get 35 percent, the two companies said in a statement today. Paris-based Sanofi will also advance MannKind as much as $175 million in expenses.

Kinder climbed 9.7 percent to $39.63, for the biggest gain in the S&P 500. The company will acquire all of Kinder Morgan Energy Partners LP, Kinder Morgan Management LLC and El Paso Pipeline Partners LP in a series of transactions valued at about $44 billion, according to a statement yesterday. Kinder Morgan Management jumped 25 percent to $96.30.

Priceline added 3.1 percent to $1,320.84. Bookings in the recent period rose 34 percent to $13.5 billion, the Norwalk, Connecticut-based company said today in a statement. That topped Priceline’s May projection for a 32 percent gain.

Tesla Motors Inc. added 5.7 percent to $262.18, poised for a record close. Deutsche Bank AG lifted its rating on the Palo Alto, California-based electric carmaker to buy from hold.

For more information, see The Buffalo News markets page.