The No. 1 U.S. automaker isn't letting go of its top spot.

General Motors Co. (GM) stock was higher 2.5% in early trading Tuesday, Oct. 24, after the Detroit-based automaker reported third quarter earnings that topped analyst expectations.

"While the market is more challenging than expected, we will deliver another strong year," CEO Mary Barra said on the subsequent earnings conference call. 

Barra's rosy optimism in the face of unique auto industry challenges was bolstered by her company's strength in creating an all-electric future, cutting costs across business units and reducing inventories on dealer lots. The earnings beat didn't hurt, either.

Earnings beat

Excluding one-time charges, GM had earnings of $1.32 per share for the three months ended Sept. 30, easily besting the average FactSet analyst expectation of $1.11 per share. The company said the third quarter was the first that was profitable in all business segments, including South America, since the fourth quarter of 2014.

"This did not happen by chance," finance chief Chuck Stevens noted on the call. Stevens highlighted South America's first profitable quarter in three years, plus another strong showing in China.

Despite an adjusted earnings beat, GM reported that the sale of its Opel/Vauxhall unit in Europe weighed on net income. The sale resulted in a mostly non-cash $5.4 billion charge, GM said. On a consolidated basis, GM reported a net loss of $2.98 billion for the quarter.

The company's pre-tax earnings of $2.5 billion for the third quarter were down about 10.7% from the same period last year. GM had warned earlier this year that profits could decline moving into the back half of 2017 as it cut production of slow-selling cars and pivoted production toward SUVs and crossovers.

GM said it delivered 781,056 total vehicles in the quarter, led by a 25% increase in retail crossover sales. It was the best ever third quarter performance for that sector.

All-electric future

Barra highlighted GM's bold play to achieve an all-electric future as a leader in greener energy. The company has recently looked into opening offices in a few European hub cities, Barra said, but she added that "regardless of where [GM] does business, [it is] committed to an all-electric future."

Earlier this month, GM announced its intended course to achieve a zero emissions future with two new all-electric models in the next 18 months and at least 20 all-electric models launched by 2023.

A great deal of the "hard work, investment and innovation" related to GM's all-electric crusade has already been done, Barra said.

In addition to its moves in electric cars, GM focused on strides it's made in self-driving models.

Autonomous moves

"Our vision is ambitious...we have the right team with the right business and technical expertise," Barra said. The CEO noted that GM's decision to test their autonomous models in San Francisco has ramped up the speed of development by testing the cars in high-pressure, high-stress and high-traffic environments early on.

But don't expect to see GM's autonomous models all over your neighborhood just yet. Barra made it clear that the company isn't rolling out its Cruise self-driving technology in models until it's absolutely sure the feature is safe to use.

"We're looking at it from a safety perspective, from a performance perspective," Barra said.

Looking forward, GM expects margins of at least 10% and earnings per share between $6 and $6.50 for the full year. Inventories will sit around 800,000 for all models by year-end, GM said, on an 80-day average supply. Stevens said that's "normal" for GM.

GM stock has pushed higher about 33% since the start of the year.

More from Stocks

Interesting Symmetry but Strong Trends Are Likely to Give Way to Volatility

Interesting Symmetry but Strong Trends Are Likely to Give Way to Volatility

Investing Is a 'Constant Learning Game' According to M1 Finance CEO

Investing Is a 'Constant Learning Game' According to M1 Finance CEO

Dow Sinks as Global Growth Warnings Rattle Wall Street, Nasdaq Tumbles Nearly 2%

Dow Sinks as Global Growth Warnings Rattle Wall Street, Nasdaq Tumbles Nearly 2%

Schlumberger Stock: Why Now Is a Good Time to Buy

Schlumberger Stock: Why Now Is a Good Time to Buy

My Greatest Concern About Procter & Gamble Heading Into Earnings

My Greatest Concern About Procter & Gamble Heading Into Earnings