It began with a £1 contract.

In the hours after a pandemic was declared in March 2020, Palantir, the secretive American data analytics company, was invited to 10 Downing Street along with other tech groups, including Amazon, Google and Meta, to discuss how it could help the British government respond.

Within days, Palantir’s software was processing streams of data from across England’s National Health Service, with Palantir engineers embedded to help. The company’s services, used by the C.I.A. and Western militaries for more than a decade, were deployed to track emergency room capacity and direct supplies of scarce equipment.

Palantir charged the government just one pound.

The deal provided the company with a valuable toehold. Since then, Palantir, which is chaired by Peter Thiel, the billionaire investor and one of President Donald J. Trump’s major 2016 donors, has parlayed the work into more than £60 million in government health contracts. Its biggest reward may be yet to come: a seven-year contract worth up to £480 million — about $590 million — to overhaul N.H.S. England’s outdated patient data system.

But an outcry over Palantir’s rapid ascent within the N.H.S., the beleaguered but beloved public institution that provides free health care across the country, has been building for months among some lawmakers, doctors and privacy campaigners. It could come to a head in October, when the winning bid is expected to be announced.

The contract Palantir is competing for would create one of the largest repositories of health data in the world and make the company a key partner in modernizing the health system, which has an annual budget of £160 billion. Civil society groups have raised alarms about a single private company handling so much personal data, especially one dogged by concerns that its software can be used for mass surveillance. During the Trump administration, the U.S. Immigration and Customs Enforcement agency used Palantir software to help find undocumented immigrants.

The unease also reflects a culture clash. Palantir, which has a market value of over $30 billion, has employed a lobbying playbook honed in the U.S., at times ruffling British officials unaccustomed to its assertive approach. It has enlisted political figures, senior health executives and multiple consulting firms, according to interviews with N.H.S. officials, industry insiders and people involved in Palantir’s operations. In 2022, after requests for proposals were sought for the £480 million contract, Palantir poached N.H.S. England’s deputy director of data services and its artificial intelligence director.

The company’s expansion in the N.H.S. has coincided with a crisis at the 75-year-old health service, after years of constrained funding and staffing shortages. The criticism of Palantir is part of a fierce debate in Britain about the role of profit-seeking companies within a taxpayer-funded system, as well as the handling of sensitive patient information. Most Britons oppose further privatization of the health service, polls show.

In Parliament, more than a dozen lawmakers from across the political spectrum have called for greater transparency over the details of the £480 million contract. David Davis, a Conservative member of Parliament, told The New York Times he would ask England’s public spending watchdog to review “any contracts awarded to Palantir.”

“Palantir’s extensive lobbying efforts in the U.K. are an obvious attempt to whitewash their background at the heart of the world of espionage — with all its implications for ethical behavior and lack of transparency,” he said in a statement.

Palantir declined to comment on its bid, but said it was proud to support “the world’s most important private and public institutions.” The company defended the quality of its work and said, “We are now helping to reduce the N.H.S. backlog, cut the amount of time nurses and doctors need to spend on administrative tasks and speed up cancer diagnosis — all while rigorously protecting data privacy.”

N.H.S. England said the application process was “fair and transparent” and that all companies were being treated equally. “Bids are evaluated against the same objective criteria that has been shared with all suppliers,” it said in a statement.

Speaking at Oxford University in January, Mr. Thiel went off script. The N.H.S. makes people sick and should embrace privatization, he said in response to a question. The British public’s support for the service, he said, was “Stockholm syndrome.”

Palantir quickly distanced itself from Mr. Thiel’s comments, but they seemed to confirm critics’ fears about welcoming the business into the health service.

Named after the seeing stones in J.R.R. Tolkien’s “The Lord of the Rings,” Palantir, founded in 2003, originally marketed its technology as a tool for tracking terrorists and criminals — including, according to news reports it has republished, Osama bin Laden. Its software collects data from myriad inputs, including internet traffic and cellphone records, and can integrate feeds from almost any source a client has access to.

It is used by the C.I.A. and the Pentagon, while in Britain it has been used by the Ministry of Defense since at least 2018, according to Tussell, a company that tracks government contracts.

In 2018, Palantir hired the consulting firm Global Counsel to position it as a respectable partner to the British government, not a shadowy American military contractor, according to two former senior employees at the consultancy who spoke on condition of anonymity because they had signed nondisclosure agreements.

Palantir got help from several politically connected advisers.

One was Nicola Blackwood, a former health minister focused on N.H.S. innovation, who took a part-time position at Global Counsel in April 2018. Her previously unreported connection with Palantir was part of her work to provide clients with “political risk analysis,” according to information she provided to a government watchdog.

Ms. Blackwood returned to the health ministry from 2019 to 2020. She has since been paid by Global Counsel to attend a number of events in her role as chair of Genomics England, according to government disclosures, sometimes appearing with Palantir representatives. After being contacted by The Times in March, she pulled out of a speaking engagement with Global Counsel where she had been set to appear alongside a Palantir executive, at an event called “Rebooting the N.H.S.”

In a statement, Ms. Blackwood’s office said her role at Global Counsel involved providing strategic advice and had been approved by Britain’s anti-corruption watchdog. It said her interaction with Palantir was limited, that she never lobbied on the company’s behalf and that the event cancellation resulted from an unexpected schedule change.

Two months after resigning as deputy chief executive of N.H.S. England in 2019, Matthew Swindells also joined Global Counsel, where he advised Palantir. He chaired the company’s health advisory board even after becoming joint chair of four prominent N.H.S. hospital trusts, health service documents show. One of the trusts, Chelsea and Westminster, was the first to take part in a government pilot to test Palantir’s technology. (The trust said Mr. Swindells was excluded from decision-making related to Palantir.)

Shane Tickell, the chief executive of one N.H.S. contractor, Voror Health Technologies, recounted meeting with Mr. Swindells last year. Mr. Swindells, he said, suggested Voror build software to work with Palantir’s systems and added that the health service might have money available if it did. “It left me feeling awkward and uncomfortable,” said Mr. Tickell, who later joined a British consortium to challenge Palantir for the N.H.S. contract, pledging to safeguard patient data. (The bid was unsuccessful.) He provided a calendar item and dated notes from the meeting to corroborate his account.

Mr. Tickell said he believed Palantir had an inside track to win the big data contract because of its work during the pandemic and its ties to the government.

Mr. Swindells said in a statement that he no longer chaired Palantir’s health advisory board and that his Global Counsel work had always been declared to the health service. He declined to comment on the meeting with Mr. Tickell.

Last year, a government-commissioned review warned the N.H.S. to “avoid exclusive commercial arrangements” around its data, describing decades of patient records as “buried treasure” that could save lives if safely shared with researchers. The author, Prof. Ben Goldacre, noted that the data represented some of the most sensitive information that could be held about individuals, from mental health assessments to abortion records. Sharing it with analysts “is an extremely serious undertaking whose gravity must never be underestimated, if the N.H.S. is to maintain trust,” he wrote.

Against this delicate political backdrop, Palantir has emphasized that it would not collect or monetize N.H.S. data, but merely provide the software to analyze it. Simultaneously, it has tried to shape the conversation around the role of private companies in health care.

It hired Fleetwood Strategy, the consultancy co-founded by Isaac Levido, a political adviser to Prime Minister Rishi Sunak. Palantir also gave money to think tanks and industry groups, sponsoring two events at the Institute for Government that included its own staff members as speakers, and funding a Christmas party for the Cambridge Health Network, an industry body that brings together N.H.S. and corporate executives.

Palantir joined a tech industry trade group, TechUK, and urged its members to lobby government agencies to adopt a “buy vs. build” policy of purchasing commercial technology rather than developing it internally.

Others bristled at their approach.

At a TechUK meeting in August 2021, Palantir’s efforts were called “appallingly arrogant” by Ian Harris, the representative of VMware, a software company, according to a summary of the meeting made by a Palantir executive and reviewed by The Times. “It’s not for industry to tell government whether it should build or buy,” Mr. Harris said. (He did not respond to a request for comment.)

While some health officials praised Palantir’s software, particularly for its usefulness in the Covid vaccination program, questions have emerged over whether its services are suited to the complex needs of the N.H.S., which vary between regions and types of care.

Milton Keynes University Hospital Trust in Buckinghamshire was selected last year to test Palantir software as part of a pilot to relieve a backlog of patients awaiting treatment. The technology was supposed to pull data from health records, waiting lists, surgery schedules and elsewhere to help prioritize appointments.

But Palantir’s software was not compatible with the hospital’s patient management system, meaning workers had to manually enter some data, according to two hospital officials who would only share the information on condition of anonymity. Palantir told officials it would solve the issue, but the hospital suspended the project after weeks passed without a fix, the officials said.

The technology did work in some hospitals, with 24 trusts “realizing benefits,” a health minister said in August. At one, it helped reduce a backlog of nonemergency surgeries and cancer treatments by 28 percent. But 11 hospitals and health trusts paused or abandoned their involvement in the pilot program, the government said in March. One said the software “did not fully meet its needs or priorities,” while another decided its existing system “provided current capabilities.”

Palantir said in a statement that at least four of the hospitals had since resumed using the software and that its technology was “widely acknowledged as best in class.”

Whether the company secures the N.H.S. deal may not only influence the health service’s future, but also its own.

“This is a very pivotal contract,” said Rishi Jaluria, a managing director at RBC Capital Markets, who tracks the company. “It’s going to shape the narrative around Palantir.”