Palantir Technologies spent the last decade trying to shed its image as a tool of the U.S. government and sell its data-mining software to businesses. But in its pitch to institutional investors ahead of a public stock debut, the company will return to its roots.

A prospectus published Tuesday to list Palantir shares on the New York Stock Exchange opened with a letter from Alex Karp, the CEO who started the company with billionaire Peter Thiel. Passages from Karp’s missive read as if they were taken from the script of a USO tour. It opens with comments about “our welfare and security,” trumpets work with the U.S. and its allies, and concludes with a prediction that software such as Palantir’s will ensure “the strength and survival of democratic forms of government.”

A sense of patriotism is embedded throughout the securities filing. "We have chosen sides," the company declares, in explaining that it rejects work with America's global adversaries. One of Palantir's stated goals: "becoming the default operating system across the U.S. government."

For all its love of country, there’s one part of the U.S. held in low regard. In his CEO letter, Karp describes Silicon Valley as out of touch, chides large technology companies for amassing and monetizing personal data, and promotes the sanctity of working with “our nation’s defense and intelligence agencies, whose missions are to keep us safe.”

Karp and Thiel helped establish Palantir in 2003 and raised money from an arm of the U.S. Central Intelligence Agency. The founders have long said they formed the start-up as a response to the attacks two years earlier, on Sept. 11, a sentiment echoed in the filing. The goal was to design software that could organize the government’s data and help hunt terrorists to prevent another tragedy.

As it took on more government contracts, Palantir also began pursuing deals with companies. It cracked into the banking sector in 2009 and put out a news release two years later, saying it had been inducted into JPMorgan Chase’s “hall of innovation.” (Palantir would eventually stop promoting the engagement after JPMorgan’s corporate security team turned the software against the bank’s own senior executives.)

But as the company shifted its focus to corporate clients, Palantir found that close association to Washington and law enforcement carried baggage. Activists have chided the company for selling software that enables overly aggressive policing, unwarranted deportations, and invasions of privacy. (Public backlash is listed in the filing as a risk to the company’s business prospects.) So the start-up, which is prohibited from discussing government work that is classified, began downplaying its work with governments and emphasizing deals with companies.

A chart in the prospectus outlines Palantir’s march through corporate America and to companies worldwide from 2009 to 2019. By the middle of this year, it had 125 customers in 36 industries. Of those, commercial customers accounted for 53% of revenue in 2019, which totaled $743 million. They include the oil giant BP, the German pharmaceutical company Merck, and the American automotive unit of Fiat Chrysler.

Achieving a majority of revenue from corporate clients was a milestone for the company. Why Palantir would turn its focus to its government-backed beginnings is somewhat curious.

Page six of the financial paperwork offers a likely explanation: By its own estimation, government work is more lucrative. Palantir says it could someday capture $63 billion of revenue from governments compared with $56 billion from companies. Palantir's public sector is limited to "the United States, its allies and in other countries abroad whose values align with liberal democracies," according to the filing. It also said it would not work with Beijing, or provide unfettered access to its platform in China, citing a goal to "promote respect for and defend privacy and civil liberties protections."

The product, it turns out, is fairly niche, said Mandeep Singh, an analyst at Bloomberg Intelligence. Only governments or large companies are able to afford Palantir, he said. "Their revenue is incredibly concentrated. It's rare for a software company of this size to have such a small customer base."

Mike Hermus, former chief technology officer for the Department of Homeland Security, said flag waving of the type found in the Palantir filing is common for companies that rely on government work. "That's where their bread is buttered, particularly in this administration."

Palantir has created a “defensible perch,” Hermus said, by providing data analysis tools that government agencies have come to trust. Now that the company is an incumbent, it will be hard to unseat even if a new start-up can provide better technology for less money. “Once you’re in, and you know how to work the system, it’s easier to stay,” Hermus said. “There’s no question about that.”

The unprofitable company will directly list its shares for trading, rather than raise capital through an initial public offering, reportedly in September. A so-called direct listing is a route to the stock market popularized in recent years by a few high-profile tech companies, including Spotify Technology and Slack Technologies.

However, Palantir is eager to distinguish itself from a typical tech company. In many parts of the filing, it contrasts the CEO's view of American exceptionalism with the globalism prevalent throughout Silicon Valley.

"Our company was founded in Silicon Valley. But we seem to share fewer and fewer of the technology sector's values," Karp wrote. "The engineering elite of Silicon Valley may know more than most about building software. But they do not know more about how society should be organized or what justice requires."

Palantir’s rejection of the Valley, solidified with its decision to move its headquarters out of California to Denver, is complicated by its deep ties to the region. Many of its employees still live in or around Palo Alto, Calif., or graduated from Stanford University, a breeding ground for tech companies and the site of Thiel and Karp’s first meeting. Thiel is also on the board of one of the area’s most valuable companies, Facebook.