Hosni Mubarak's woes could be traced back to Egypt's 2005 election, when an army of tech-savvy poll watchers, with a little help from foreign friends, exposed the president's customary "landslide" vote as an autocrat's fraud.
In nearby Jordan, too, an outside assist on election day 2007 helped put that kingdom's undemocratic political structure in a harsh spotlight _ and the king in a bind.
And when 2011's winter of discontent exploded into a pro-democracy storm in Tunisia and then Egypt, opposition activist Bilal Diab broke away from his six-month "young leaders school" and its imported instructors, and put his new skills to use among the protest tents of Cairo's Tahrir Square.
"It helped us organize the revolution," Diab, 23, said of his made-in-America training. "People were scattered, but we had learned how to bring them together and we did, and when we opened our tent we announced formation of the Revolution Youth Union."
The revolutionary roar from the Arab street, shaking the palaces of the privileged, toppling presidents, has echoed around the globe, dominating the headlines and airwaves for weeks. But behind this story of political upheaval lies another, quieter story of outside organizations that, with U.S. government and other money, tutored a young Arab generation in the ways of winning in a political world.
All involved emphasize that what has happened sprang from deeply rooted grievances in the autocratic Arab world, not from outside inspiration. But they say the confidence-building work of democratic coaches, led by the U.S. but also including Europeans, was one catalyst for success.
That success, meanwhile, points up a core paradox: A U.S. government that long stood by Mubarak and other Arab leaders as steadfast allies was, at the same time, financing programs that ultimately contributed to his and potentially others' downfall.
Some see American shrewdness at work, covering multiple political bets in Egypt and elsewhere. Others see an America too big and complex to be consistent.
"Speaking as a Canadian, one of the beauties of the U.S. system is that there are many, many entry points in many centers of power, and they can have conflicting policies," said Les Campbell, Middle East chief for the U.S. National Democratic Institute for International Affairs.
The NDI, affiliated with the Democratic Party, and the GOP-affiliated International Republican Institute (IRI) are links in the nurturing "democratic assistance" web, key conduits for grants from the State Department's Agency for International Development (USAID) and from the National Endowment for Democracy, a private organization funded by the U.S. Congress.
National Endowment money, $100-million-plus a year, is at work in more than 90 countries worldwide. But it's the USAID grants, from an $800 million budget for developing "political competition" and "civil society" in 67 nations, that have proved vital to activists in a half-dozen Arab lands, from Morocco to Yemen. Some $104 million was requested for them in the proposed 2011 budget.
In post-Mubarak Egypt, that help is about to balloon.
Of a $150 million Egyptian "transition fund" announced by Washington, $50 million will go toward democracy and governance programs like the ones that have nurtured hundreds of Egypt's rising democrats, The Associated Press has learned. That would triple the 2011 funding previously planned.
"We need more support, and fast," said Abdallah Helmy, 34, co-founder of Egypt's dissident Reform and Development Party and one who benefited in recent years from "hundreds and hundreds of hours" of U.S.-supported training in everything from managing campaigns and elections to using Twitter, Facebook and other social media for political messaging.
It's estimated more than 10,000 Egyptians since 2005 have participated in USAID-financed democracy and governance programs, carried out by NDI, IRI and 28 other international and Egyptian organizations _ not only political training, but also projects to prepare judges, build PTA-style school associations and otherwise deepen civic involvement.
The American democracy promotion campaign dates back to the 1980s, when Poland's Solidarity movement was one beneficiary. But for Egypt, 2005 was the watershed year, when Campbell's NDI opened a Cairo office and through Egyptian groups trained 5,500 election observers to monitor a referendum giving Mubarak another six-year term, his fifth.
From Egypt's polling places that September, NDI-paid teams reported election violations via innovative cell-phone texting in code, deciphered by headquarters computers.
The report was immediate: Widespread manipulation of the polls, and a turnout of a mere 23 percent, shattering the myth of 90-percent landslides for the "popular" Mubarak.
"It had the effect of showing the emperor had no clothes," Campbell said. "Egyptians could make a difference. They could change things."
The government reacted, restricting NDI and IRI operations in Cairo, ordering host hotels to cancel training sessions, putting security men in institute offices.
But Mubarak couldn't be too tough on the Americans, donors of $1.5 billion in annual military and economic aid. And the democracy promoters carried on, often sending Egyptian proteges abroad for sessions.
Bassem Samir is one example. A 23-year-old poll watcher in 2005, since then this leader of the activist Egyptian Democratic Academy has been flown to Washington, Hungary, Dubai and elsewhere to learn about political organization, use of new media, protest campaigning and other skills, under both IRI and NDI sponsorship.
In a two-week U.S. session underwritten by the Washington-based Freedom House, another USAID grantee, Samir did intensive work on social media, visiting Google's offices, hearing from a new-media specialist from the Obama 2008 campaign.
This was "good one-on-one contact" and led to useful advice from afar, he said, when Cairo's protesters struggled to counter the government's suppression of Internet communications.
A blogger, Samir also took part in an NDI conference in Morocco last year as the U.S. institute developed a new web portal, Aswat, gathering dissident postings from around the Arab world, some by NDI-trained bloggers.
Such cross-border networking is spreading under the U.S. groups' umbrella. Oraib al-Rantawi, a leading NDI-backed activist in Jordan, told the AP he had been flown to Yemen twice to advise counterparts there on policymaking.
With NDI support, Rantawi's Al Quds Center for Political Studies is monitoring the work of Jordan's Parliament via regular online reports, the first such scrutiny for a body whose makeup is widely viewed as unrepresentative, based on an electoral system skewed to support King Abdullah II's strong monarchy.
Weekly marches by thousands in Amman, Jordan's capital, have been demanding an overhaul of anachronistic election laws and a stripping of the king's power to appoint prime ministers. Those demands, in good part, sprang from a years-long process that began with NDI support for monitoring Jordan's 2007 elections.
"They helped us tremendously. We wouldn't have been successful in finding a local sponsor," said Muhyiedden Touq, whose National Center for Human Rights led a 50-group coalition in also observing Jordan's 2010 elections, when 1,200 poll watchers were fielded at a cost of $250,000 in USAID funds.
As the Mideast seethes with protest, new questions may arise about the role played by democracy boosters, who also include affiliates of German political parties and other European and Canadian groups.
For Jordan's Rantawi, there's no question.
"All these efforts, by local and international organizations, paved the way for what's going on today," he said. "These youths didn't come from nowhere and make a revolution."
In Cairo, an ex-official of Mubarak's own National Democratic Party sounded a similar note.
"NDI, IRI, Freedom House _ most of the leadership of the revolution are trained, like 80 percent," said Marwan Youness, an opposition trainee himself before joining the NDP.
People in the streets created the revolution, not outsiders, he said. "But they are the catalyst."
In emerging Arab democracies, questions also will arise over how the U.S. and other powers will deal with Islamist political forces, generally anti-American.
Rohile Gharaibeh of Amman's Islamic Action Front, Jordanian political arm of the regionwide Muslim Brotherhood, is dismissive of U.S. influence in recent events.
"What has happened in Egypt or Tunisia has nothing to do with any money spent by the U.S.," he said. "Things reached an explosion point."
But his IAF apparently doesn't dismiss the value of what the Americans are doing. Asked whether his group had taken advantage of NDI-supported training, Gharaibeh nodded yes. "We sent some of our young people there," he said.