Major stock indexes are mixed in afternoon trading Monday, having given up an early gain after the U.S. and Canada agreed to a new trade deal that includes Mexico. Smaller companies are slipping and the price of U.S. crude oil reached its highest price in almost four years.

General Electric is surging after it replaced Chairman and CEO John Flannery, who led the company for a little more than a year. Tesla is jumping after company founder Elon Musk agreed to a settlement with regulators that will allow him to remain CEO of the electric car maker.

KEEPING SCORE: The S&P 500 index added 11 points, or 0.4 percent, to 2,925 at closing time. The Dow Jones Industrial Average jumped 194 points, or 0.7 percent, to 26,652.

The Nasdaq composite lost 9 points, or 0.1 percent, to 8,037. The Russell 2000 index of smaller-company stocks fell 23 points, or 1.4 percent, to 1,673 as investors continued to move away from smaller and more U.S.-focused companies. The Russell is down 3.9 percent since its most recent record close at the end of August.

Mexico’s main stock index rose 0.8 percent and while Canada’s added 0.2 percent.

AFTER NAFTA: The new trade deal, dubbed the United States-Mexico-Canada Agreement, gives U.S. farmers greater access to the Canadian dairy market. But it keeps a NAFTA dispute-resolution process that the U.S. wanted to eliminate and offers Canada protection if the U.S. goes ahead with plans to impose tariffs on cars, trucks and auto parts imported into the United States.

Mexico and the U.S. announced a trade agreement in late August and experts expected Canada would eventually join the pact, as Canada is the U.S.’ second-largest trade partner and a deal without Canada would have affected the supply lines of companies in numerous industries.

Dairy producer Dean Foods gained 1.8 percent to $7.23 and General Motors added 1.2 percent to $34.07.

Industrial companies also advanced. Boeing advanced 2.3 percent to $380.54. Among materials companies, DowDuPont added 0.9 percent to $64.86.

THE QUOTE: “Most investors thought the NAFTA deal would end somewhat peacefully,” said Mark Hackett, chief of investment research at Nationwide Investment Management. “It’s an incremental positive to get it out of the news but it’s not transformational.”

GE CEO O-U-T: Flannery took over GE from Jeffrey Immelt in 2017 and tried to return the company to its industrial roots by focusing on aviation, health care and power. Investors weren’t sure if those changes were radical enough, as some thought the company should split up.

The company has had several big missteps. In June GE said it would pay $15 billion to make up for miscalculations by an insurance division, and in September, the stock fell to a nine-year low after the company said its marquee gas turbine was flawed, which forced the shutdown of two power plants. On Monday GE said it is taking a $23 billion charge related to its power business and will miss its annual profit target.

Flannery will be replaced by H. Lawrence Culp, the CEO of industrial and medical device company Danaher from 2000 to 2014. GE stock jumped 7.2 percent to $12.10.

ELON’S NOT GONE: Tesla gained 16.5 percent to $308.46 after Musk agreed to give up the chairman’s role for at least three years, while Tesla will appoint two new, independent directors to its board. The stock plunged 14 percent Friday after the Securities and Exchange Commission said Musk misled investors in August with a tweet saying he had secured the funding to take Tesla private.

In a court filing, the SEC said it wanted to bar Musk from serving as an officer or director of a publicly traded company and called his actions securities fraud. Musk and Tesla are each paying $20 million to resolve the lawsuit.

ENERGY: Benchmark U.S. crude climbed 2.8 percent to $75.30 a barrel in New York, its highest closing price since November 2014. Brent crude, used to price international oils, added 2.7 percent to $84.98 per barrel in London. It’s also traded at four-year highs recently.

Wholesale gasoline rose 2 percent to $2.13 a gallon. Heating oil added 2.5 percent to $2.41 a gallon. Natural gas jumped 2.9 percent to a three-year high of $3.09 per 1,000 cubic feet.

Hackett, of Nationwide, said the recent rise in oil prices is a bigger problem for small companies than it is for larger multinationals.

BONDS: Bond prices fell. The yield on the 10-year Treasury note rose to 3.09 percent from 3.05 percent.

METALS: Gold fell 0.4 percent to $1,191.70 an ounce. Silver lost 1.4 percent to $14.51 an ounce. Copper slid 0.6 percent to $2.79 a pound.

CURRENCIES: The dollar rose to 113.99 yen from 113.58 yen. The euro dipped to $1.1575 from $1.1610. The Canadian dollar fell to 1.2787 from 1.2922.

OVERSEAS: Germany’s DAX added 0.8 percent while the CAC 40 in France advanced 0.2 percent. Britain’s FTSE 100 fell 0.2 percent. After a sharp drop Friday, Italy’s FTSE MIB lost another 0.5 percent as investors worried about the new government’s plan to increase spending. The index has fallen 16 percent in the last five months.

Japan’s benchmark Nikkei 225 gained 0.5 percent and South Korea’s Kospi gave up 0.2 percent. Markets in Hong Kong and the Chinese mainland were closed for National Day holidays.

© The Associated Press. All rights reserved.