(Bloomberg) -- Palantir Technologies Inc. surged the most in almost six months after the company reported the fourth consecutive quarter of profitability and highest earnings since its founding 20 years ago, citing strong demand for new artificial intelligence offerings.

The Denver-based data analysis company said Thursday it expects adjusted operating income for the year in the range of $607 million to $611 million, beating an average of analyst estimates of $577 million. The company also said it expects 2023 revenue of about $2.22 billion, narrowly outpacing analyst expectations. The stock rose as much as 23%, to $18.30, its biggest intraday gain since May. 

Palantir, famous for its work with intelligence agencies and its billionaire co-founder Peter Thiel, reported $72 million net income in the quarter ending Sept. 30 and a 17% rise in revenue, to $558 million.

“We earned the most significant profit in our company’s twenty-year history,” Palantir Chief Executive Officer Alex Karp wrote in a letter to shareholders Thursday. “With these results, our company is now eligible for inclusion in the S&P 500, a milestone that we have been working towards and knew was within reach.”

Long criticized on Wall Street for relying too heavily on engineers customizing its software for individual customers, Palantir has automated more work in recent years. The revenue it generates per employee nearly doubled in the past four years, Karp said in the letter.

Palantir’s stock has been on a tear since it announced high demand for its AI offerings earlier this year, with the debut of a new product called the Artificial Intelligence Platform. Karp said this summer that the tools were so powerful he wasn’t sure he should even sell it to some customers.

Palantir has made progress on getting customers set up with its products faster than in the past, Chief Legal Officer and Chief Revenue Officer Ryan Taylor said in an interview. Instead of trial runs allowing users to experiment with its technology, the company is increasingly hosting “bootcamps” to train and convert potential customers into paying subscribers. What used to take as long as three months can now be achieved in one to five days, Taylor said. 

Palantir will train 70 organizations at bootcamps in November alone — more than all the pilots the company completed last year, Karp said during a call with analysts. The bootcamp approach has been so effective at winning customers, Karp said, that he thinks “Palantir can hit a revenue run rate of $1 billion by 2025.”

The number of US-based commercial customers at the company grew 37% in the third quarter to reach 181. Meanwhile, commercial revenue climbed 23% to $251 million. 

That outpaced revenue growth from government customers, which rose 12% to hit $308 million. The company’s revenue from governments missed analyst expectations of $319 million. 

Palantir Chief Financial Officer David Glazer said in an interview that the slower government spending during the third quarter reflected “near-term uncertainty” related to budgeting.

The company’s software has been in use by Ukrainian defense forces since Russia’s invasion and the company has worked in Israel for more than decade. 

Karp called the October attack by Hamas on Israel “terrorism,” and said Palantir fully supports Israel and is assisting the Israeli effort now. “We are on the front lines fighting what amounts to evil,” Karp said.

Palantir ended the quarter with $3.3 billion in cash, cash equivalents and short-term US Treasury securities.

(Updates with opening shares and executive comments)

©2023 Bloomberg L.P.