Keith Lee, an Air Force veteran and former police detective, spent the morning of Jan. 6 casing the entrances to the U.S. Capitol.

In online videos, the 41-year-old Texan pointed out the flimsiness of the fencing. He cheered the arrival, long before President Donald Trump's rally at the other end of the mall, of far-right militiamen encircling the building. Then, armed with a bullhorn, Lee called out for the mob to rush in, until his voice echoed from the dome of the Rotunda.

Yet even in the heat of the event, Lee paused for some impromptu fundraising.

"If you couldn't make the trip, give five to 10 bucks," he told his viewers, seeking donations for the legal costs of two jailed "patriots," a leader of the far-right Proud Boys and an ally who had clashed with police during an armed incursion at Oregon's statehouse.

Much is still unknown about the planning and financing of the storming of the Capitol, aiming to challenge Trump's electoral defeat. What is clear is that it was driven, in part, by a largely ad hoc network of low-budget agitators, including far-right militants, Christian conservatives and ardent adherents of the QAnon conspiracy theory. Lee is all three. And the sheer breadth of the movement he joined suggests it may be far more difficult to confront than a single organization.

In the months leading up to the riot, Lee had helped organize a series of pro-Trump car caravans around the country, including one that temporarily blockaded a Biden campaign bus in Texas and another that briefly shut down a Hudson River bridge in the New York City suburbs. To help pay for dozens of caravans to meet at the Jan. 6 rally, he had teamed with an online fundraiser in Tampa, Florida, who secured money from small donors and claimed to pass out tens of thousands of dollars.

Theirs was one of many grassroots efforts to bring Trump supporters to the Capitol, often amid calls for revolution, if not outright violence. On an online ride-sharing forum, Patriot Caravans for 45, more than 4,000 members coordinated travel from as far away as California and South Dakota. Some 2,000 people donated at least $181,700 to another site, Wild Protest, leaving messages urging ralliers to halt the certification of the vote.

Oath Keepers, a self-identified militia whose members breached the Capitol, had solicited donations online to cover "gas, airfare, hotels, food and equipment." Many others raised money through crowdfunding site GoFundMe or, more often, its explicitly Christian counterpart, GiveSendGo. (On Monday, money transfer service PayPal stopped working with GiveSendGo because of its links to the violence at the Capitol.)

A few prominent firebrands, an opaque pro-Trump nonprofit and at least one wealthy donor had campaigned for weeks to amplify the president's false claims about his defeat, stoking the anger of his supporters.

A chief sponsor of many rallies leading up to the riot, including the one featuring the president Jan. 6, was Women for America First, a conservative nonprofit. Its leaders include Amy Kremer, who rose to prominence in the Tea Party movement, and her daughter, Kylie Jane Kremer, 30. She started a "Stop the Steal" Facebook page on Nov. 4. More than 320,000 people signed up in less than a day, but the platform promptly shut it down for fears of inciting violence. The group has denied any violent intent.

By far the most visible financial backer of Women for America First's efforts was Mike Lindell, a founder of the MyPillow bedding company, identified on a now-defunct website as one of the "generous sponsors" of a bus tour promoting Trump's attempt to overturn the election. In addition, he was an important supporter of Right Side Broadcasting, an obscure pro-Trump television network that provided blanket coverage of Trump rallies after the vote, and a podcast run by former Trump adviser Steve Bannon that also sponsored the bus tour.

"I put everything I had into the last three weeks, financial and everything," Lindell said in a mid-December television interview.

In a tweet the same month, he urged Trump to "impose martial law" to seize ballots and voting machines. Through a representative, Lindell said he only supported the bus tour "prior to Dec. 14" and was not a financial sponsor of any events after that, including the rally Jan. 6. He continues to stand by the president's claims and met with Trump at the White House on Friday.

By late December, the president himself was injecting volatility into the organizing efforts, tweeting an invitation to a Washington rally that would take place as Congress gathered to certify the election results.

"Be there, will be wild!" Trump wrote.

The next day, a new website, Wild Protest, was registered and quickly emerged as an organizing hub for the president's most zealous supporters. It appeared to be connected to Ali Alexander, a conspiracy theorist who vowed to stop the certification by "marching hundreds of thousands, if not millions, of patriots to sit their butts in D.C. and close that city down."

Alexander could not be reached for comment, but in a video posted to Twitter last week, he denied any responsibility for the violence.

While other groups like Women for America First were promoting the rally where Trump would speak — at the Ellipse, about 1 mile west of the Capitol — the Wild Protest website directed Trump supporters to a different location: the doorsteps of Congress.

Lee, who sought to raise legal-defense money the morning before the riot, did not respond to requests for comment. He has often likened supporters of overturning the election to the signers of the Declaration of Independence and has said he is willing to give his life for the cause.

A sales manager laid off at an equipment company because of the pandemic, he has said that he grew up as a conservative Christian in East Texas. Air Force records show that he enlisted a month after the Sept. 11, 2001, attacks and served for four years, leaving as a senior airman. Later, in 2011 and 2012, he worked for a private security company at a U.S. military base in Afghanistan.

In between, he also worked as a police detective in McKinney, Texas.

He had never been politically active, he has said. But during Trump's presidency, Lee began to immerse himself in the online QAnon conspiracy theory. Its adherents hold that Trump is trying to save America from a shadowy ring of pedophiles who control the government and the Democratic Party. Lee has said that resonated with his experience dealing with child crimes as a police officer.

His active support for Trump began in August when he organized a caravan of drivers from around Texas to show their support for the president by circling the capital, Austin. That led him to found a website, MAGA Drag the Interstate, to organize Trump caravans around the country.

By December, Lee had achieved enough prominence that he was included in a roster of speakers at a news conference preceding a "March for Trump" rally in Washington.

"We are at this precipice" of "good versus evil," Lee declared. "I am going to fight for my president. I am going to fight for what is right."

He threw himself into corralling fellow "patriots" to meet in Washington on Jan. 6, and at the end of last month he began linking his website with the Tampa organizer to raise money for participants' travel.

The fundraiser, who has identified himself as a web designer named Thad Williams, has said in a podcast that sexual abuse as a child eventually led him to the online world of QAnon.

Lee's MAGA Drag the Interstate site, for its part, said it had organized car caravans of more than 600 people bound for the rally. It used military-style shorthand to designate routes in different regions across the country, from Alpha to Zulu, and a logo on the site combined Trump's distinctive hairstyle with Pepe the Frog, a symbol of the alt-right that has been used by white supremacists.

Participants traded messages about where to park together overnight on the streets of Washington. Some arranged midnight rendezvous at highway rest stops or Waffle House restaurants to drive together on the morning of the rally.

On the evening of Jan. 5, Lee broadcast a video podcast from a crowd of chanting Trump supporters in the Houston airport, waiting to board a flight to Washington.

"We are there for a show of force," he promised, suggesting he anticipated street fights even before dawn. "Gonna see if we can do a little playing in the night."

By 10:45 a.m. the next day, more than an hour before Trump spoke, Lee was back online broadcasting footage of himself at the Capitol.

"If you died today and you went to heaven, can you look George Washington in the face and say that you've fought for this country?" he asked.

By noon, he was reporting that "backup" was already arriving, bypassing the Trump speech and rally. The Proud Boys and Oath Keepers were among the groups that went directly to the Capitol.

"Guys, we got the Three Percent here! The Three Percent here that loves this country and wants to fight!" Lee reported a little later, referring to another militant group. "We need to surround this place."

Backed by surging crowds, Lee had made his way into the Rotunda and by 3 p.m. — after a fellow assailant had been shot, police officers had been injured and local authorities were pleading for help — he was back outside using his megaphone to urge others into the building.

"If we do it together," he insisted, "there's no violence!"

When he knew that lawmakers had evacuated, he declared victory: "We have done our job," he shouted.