Just over a year ago, lawmakers displayed a rare show of bipartisanship when they grilled Shou Chew, TikTok’s chief executive, about the video app’s ties to China. Their harsh questioning suggested that Washington was gearing up to force the company to sever ties with its Chinese owner — or even ban the app.
Then came mostly silence. Little emerged from the House committee that held the hearing, and a proposal to enable the administration to force a sale or ban TikTok fizzled in the Senate.
But behind the scenes, a tiny group of lawmakers began plotting a secretive effort that culminated on Wednesday, when President Biden signed a bill that forces TikTok to be sold by its Chinese owner, ByteDance, or risk being banned. The measure, which the Senate passed late Tuesday, upends the future of an app that claims 170 million users in the United States and that touches virtually every aspect of American life.
For nearly a year, lawmakers and some of their aides worked to write a version of the bill, concealing their efforts to avoid setting off TikTok’s lobbying might. To bulletproof the bill from expected legal challenges and persuade uncertain lawmakers, the group worked with the Justice Department and White House.
And the last stage — a race to the president’s desk that led some aides to nickname the bill the “Thunder Run” — played out in seven weeks from when it was publicly introduced, remarkably fast for Washington.
“You don’t get many opportunities like this on a major issue,” said Representative Steve Scalise of Louisiana, the Republican majority leader. He was one of 15 lawmakers, aides and officials directly involved in shaping and passing the bill who were interviewed for this article.
“This fight’s been going on for years,” Mr. Scalise said. “We learned a lot from each step, and we wanted to make sure we had strong legal standing and a strong bipartisan coalition to do this.”
Their success contrasts with the stumbles by other lawmakers and American officials, starting during the Trump administration, to address national security concerns about TikTok. They say the Chinese government could lean on ByteDance to obtain sensitive U.S. user data or influence content on the app to serve Beijing’s interests, including interfering in American elections.
TikTok has pushed back against those accusations, saying that the Chinese government plays no role in the company and that it has taken steps and spent billions of dollars to address the concerns. It has also fought back aggressively in the courts against previous actions by federal and state governments.
But the strategy employed by the lawmakers in recent weeks caught TikTok flat-footed. And while the app is unlikely to disappear from Americans’ phones as next steps are worked out, the measure stands out as the first time a U.S. president has signed a bill that could result in a wide ban of a foreign app.
In a statement, Alex Haurek, a TikTok spokesman, said the bill “was crafted in secret, rushed through the House and ultimately passed as part of a larger, must-pass bill exactly because it is a ban that Americans will find objectionable.”
He added that it was “sadly ironic that Congress would pass a law trampling 170 million Americans’ right to free expression as part of a package they say is aimed at advancing freedom around the world.”
From Tiny Huddle to Big Majority
The effort around a TikTok bill began with Mr. Scalise, who met with Representative Cathy McMorris Rodgers, a Republican from Washington, in March last year about their desire to see a measure that took on the app.
They began talking with other Republican lawmakers and aides across several committees about a new bill. By August, they had decided to shepherd a potential bill through a House committee focused on China, the Select Committee on the Chinese Communist Party, led by Representatives Mike Gallagher, a Wisconsin Republican and its chairman, and Raja Krishnamoorthi, an Illinois Democrat.
The bipartisan committee swiftly embraced the effort. “What we recognized was that there were so many different approaches and the technical issues were so complex,” Mr. Krishnamoorthi said.
So the committee hatched a strategy: Win the support of Democrats, the White House and the Justice Department for a new bill.
Its efforts got a lift after lawmakers including Mr. Gallagher accused TikTok of intentionally pushing pro-Palestinian and anti-Israel content to its users last year. Mr. Krishnamoorthi and others said the Israel-Gaza conflict stoked lawmakers’ appetites to regulate the app.
In November, the group, which then numbered fewer than 20 key people, brought in officials from the Justice Department, including Lisa Monaco, the deputy attorney general, and staff from the National Security Council to help secure the Biden administration’s support for a new bill.
For years, the administration had weighed a proposal by TikTok, called Project Texas, that aimed to keep sensitive U.S. user data separate from the rest of the company’s operations. The Justice Department and National Security Council officials agreed to support the new bill partly because they saw Project Texas as inadequate to handle national security concerns involving TikTok, two administration officials said.
In conversations with lawmakers, White House officials emphasized that they wanted ByteDance to sell TikTok rather than impose a ban, partly because of the app’s popularity with Americans, three people involved in the process said.
The Justice Department and Ms. Monaco provided guidance on how to write the bill so it could withstand legal challenges. TikTok previously fended off efforts to ban it by citing the First Amendment rights of its users. The officials explained how to word the bill to defend against those claims, citing national security.
With the administration’s support in hand, the group quietly solicited more supporters in the House. The Justice Department joined members of the Office of the Director of National Intelligence and F.B.I. to brief House committees on the threats posed by TikTok’s Chinese ownership. The briefings were later delivered in the Senate.
Ms. Monaco also met individually with lawmakers, warning them that TikTok could be used to disrupt U.S. elections.
“She built out a powerful case, and we agreed that not only was data gathering taking place, she shared that you have 170 million American that were vulnerable to propaganda,” Senator Mark Warner, Democrat of Virginia, said of a meeting with Ms. Monaco in Munich in February.
On March 5, Mr. Gallagher and Mr. Krishnamoorthi announced the bill and named around 50 House members who endorsed it. The Energy and Commerce Committee, which is led by Ms. McMorris Rodgers, took the bill up that week.
TikTok, which had been negotiating with U.S. officials over its Project Texas plan, was caught off guard. It quickly sent information to members of the Energy and Commerce Committee outlining TikTok’s economic contributions in their districts, according to documents viewed by The New York Times. It also used a pop-up message on its app to urge users to call legislators to oppose a ban.
But when hundreds of calls flooded into some lawmakers’ offices, including from callers who sounded like minors, some of the lawmakers felt the bill was being misrepresented.
“It transformed a lot of lean yeses into hell yeses at that point,” Mr. Krishnamoorthi said.
Former President Donald J. Trump, the presumptive Republican presidential nominee, voiced opposition to the bill, causing panic. But Mr. Scalise said he had urged Mr. Trump to reconsider, and a vote proceeded.
Two days after the bill was unveiled, Ms. McMorris Rodgers’s committee voted 50 to 0 to advance it to the full House, where it passed the next week by 352 to 65.
There were tears of joy in Mr. Krishnamoorthi’s office, two people said. Mr. Gallagher’s staff members celebrated with a cookie cake sent by Mr. Scalise, one of his signature rewards for successful legislation.
A Less Certain Future
Even with the bill’s swift passage in the House, its future in the Senate was uncertain. Some senators, including powerful committee chairs like Maria Cantwell, a Democrat of Washington, and Mr. Warner, considered changes to the bill in a process that could significantly slow it down.
The House bill gave ByteDance six months to sell TikTok. Senators wanted to extend the timeline and detail the government’s national security concerns about TikTok in the bill, to make it clear to courts how it justified the measure.
As the Senate worked on the bill, TikTok contacted lawmakers’ offices and spent at least $3 million in ads to defend itself. It blanketed the airwaves in key states with commercials depicting how users — like nuns and ranchers — make a living and build communities through the app.
TikTok also had support from conservative groups like Club for Growth and the Cato Institute, both backed by Jeffrey Yass, a prominent investor in the app, and liberal organizations like the American Civil Liberties Union, which said the bill would violate Americans’ First Amendment rights.
A Club for Growth spokesman said Mr. Yass “never requested Club to take a position or action on his behalf.”
Some deep-pocketed groups on the right mobilized to support the bill. One was the American Parents Coalition, backed by Leonard Leo, a conservative activist, which ran an ad campaign called “TikTok Is Poison” in March. A spokesman for Mr. Leo said he was “proud to support” the group’s efforts.
Some in Silicon Valley also spoke out in favor of the bill, including Vinod Khosla, a venture capitalist, and Jacob Helberg, a senior policy adviser to Palantir’s chief executive.
Bijan Koohmaraie, a counsel in Mr. Scalise’s office who helped drive the bill, said a main reason to keep the process secret for so long had been to keep lobbyists away.
“No company had any influence or was helping draft this bill on the outside,” he said.
A New Opportunity
As the bill sat in the Senate, a new opportunity presented itself. The House speaker, Mike Johnson, announced an attempt last week to pass foreign aid for countries including Ukraine. To ensure he had the votes, Mr. Johnson took the unusual step of attaching a package of bills popular with Republicans, including the TikTok measure.
Senators scrambled now that the House had forced their hand. Ms. Cantwell’s office asked the House for multiple edits to the measure, a person with knowledge of the matter said.
House lawmakers made just one change the Senate wanted. The version of the bill in the aid package extended the deadline for a TikTok sale to nine months from six months. The president can add another 90 days if ByteDance has made progress toward selling TikTok.
“The most important thing is to have enough time to effect a sale,” Ms. Cantwell said.
The change was enough. Late Tuesday, the Senate passed the bill overwhelmingly, 79 to 18. On Wednesday morning, Mr. Biden signed it into law.