WASHINGTON — Two months before Egyptian police stormed the offices of U.S.-backed democracy organizations last year, seven Egyptian employees resigned from one of the American groups to protest what they called undemocratic practices.

They complained that the U.S. group, described as nonpartisan, had excluded the country's most popular Islamist political organization from its programs, collected sensitive religious information about Egyptians when conducting polls to send to Washington, and ordered employees to erase all computer files and turn over all records for shipment abroad months before the raids.

"Our resignation is a result of many different practices we have been witnessing that seem suspicious and unprofessional," the Egyptian employees wrote in their Oct. 17 resignation letter.

This wasn't the democracy that Dawlat Soulam, one of those who quit, said she had hoped to deliver to Egypt when she went to work for the International Republican Institute.

Soulam, a New York City-born Egyptian with dual citizenship, and the others said they were troubled by work being done under the programs run by Sam LaHood, the son of U.S. Transportation Secretary Ray LaHood.

"Are we doing something we want to hide from the Egyptians?" Soulam, in a telephone interview from Cairo, said she asked her bosses. "Are you playing a political agenda and you don't want to show that you want to take sides?"

IRI officials deny doing anything improper and dismiss the former employees as disgruntled. But the workers' small revolt, unknown to most, was significant because it reflected a growing sense in Egypt that U.S.-backed democracy programs were less about helping Egyptians and more about serving American interests.

Interviews and documents obtained by The Associated Press show that the workers' protest and the broader government crackdown with the raids helped expose what U.S. officials do not want to admit publicly: The U.S. government spent tens of millions of dollars financing and training liberal groups in Egypt, the backbone of the Egyptian uprising. This was done to build opposition to Islamic and pro-military parties in power, all in the name of developing democracy and all while U.S. diplomats were assuring Egyptian leaders that Washington was not taking sides.

"We were picking sides," said a senior U.S. official involved in discussions with Egyptian leaders after last year's revolution swept President Hosni Mubarak from power after three decades. The official requested anonymity to discuss sensitive diplomatic matters.

Since the December raids, U.S. officials have scrambled to repair their once close relationship with Egypt. But the damage wasn't done overnight or as a result of the raids.

Documents and interviews with U.S. and Egyptian officials show:

—U.S. diplomats knew as far back as March 2008 that Egyptian leaders might close democracy programs and arrest workers, and last year some even discussed the possibility of a stern Egyptian response to dumping $65 million into democracy training after the Arab Spring uprisings, a sharp increase from past spending.

—Democracy training programs with strong ties to the U.S. political parties received the biggest share, $31.8 million, and spent it with few strings attached. IRI refused to work with members of the Muslim Brotherhood's Freedom and Justice Party, an Islamic group that holds more seats in the elected parliament than any other party in the country. IRI's Democratic counterpart, the National Democratic Institute, offered training and support to Brotherhood members.

—Nearly six years before the Egyptian government filed charges against the U.S. democracy workers, its leaders severely restricted the American democracy programs after a controversy over public comments by IRI's director.

The use of U.S. money to support some groups over others appears to conflict with U.S. Agency for International Development policy that requires "a good faith effort to assist all democratic parties, with equitable assistance." A senior USAID official, who requested anonymity because she was not authorized to speak publicly, said she was not aware that IRI had excluded members of the Muslim Brotherhood from its programs. But she denied the agency picked sides when it distributed money to Egyptian or international groups.

Despite a U.S. commitment to make public the details of its democracy aid program in Egypt, USAID has refused to identify all the groups that received money and the grant amounts. The official said the agency disclosed the list to Egyptian leaders, but will not release information publicly about grant recipients that don't want to be identified. That has surprised some State Department officials.

"All I remember is, there were weekly meetings this time last year about how this all had to be posted publicly," said a senior State Department official, who requested anonymity because he was not authorized to speak publicly about sensitive diplomatic matters. More than a year after citizens rallied in Tahrir Square for new leadership, the U.S.-Egypt relationship remains fragile.

The Egyptian government shut down U.S.-funded democracy programs. Islamic political groups that the U.S. feared would gain greater control in Egypt are becoming more popular, already holding most seats in parliament and competing in the runoff for the presidency. A hearing is scheduled Tuesday in the trial of 43 democracy workers, including 16 Americans, charged with illegally operating political, campaign and election training programs financed with U.S. and other foreign money. Most of the Americans are no longer in Egypt and not expected to appear at the trial.

The trial is expected to reveal what previously was a long-standing, at times heated, private argument between American and Egyptian officials over the U.S. role in Egyptian governance. Some political leaders contend that the U.S. has interfered in Egyptian affairs by directly financing political and campaign training programs. The U.S. organizations and government say the claim of interference and the spectacle of the trial are part of an effort to deflect anger from Egyptian leaders resisting democracy.

It's clear from the U.S. experience in Egypt that a growing reliance by American officials on financing democracy promotion in countries wary of U.S. interference can jeopardize American interests and the push for greater freedoms. In addition to Egypt, American-financed democracy groups also have been barred from Bahrain and the United Arab Emirates.

Some argue the U.S. goals to promote democracy in Egypt backfired after the Arab Spring, damaging American interests in a country considered crucial to Middle East stability, because Western leaders didn't fully grasp what was happening.

"The problem was that when the revolution in Egypt took off, all kinds of sensitivities came roaring to the surface," said Frank Wisner, a former U.S. ambassador to Egypt. "And in the roiled waters, anyone who was around playing in Egyptian politics ran risks. I think our friends and the U.S. government did not appreciate the extent of those risks and weren't prepared to deal with them."

It's not like there weren't warning signs.

Former U.S. Ambassador Francis Ricciardone wrote in a secret State Department memo in March 2008 that Egypt's minister for international cooperation, Fayza Aboulnaga, continued to complain about U.S. money for unlicensed democracy groups that trained political activists. Ricciardone was worried that the groups, which he called partners, could be targeted by the minister, who opposed the U.S. financing of the groups unless the money went through her office.

"Our partners need to be aware that there may be legal or political consequences of accepting (U.S.) funds. We do not believe that Aboulnaga will escalate by pushing security authorities to arrest our partners or close their organizations without additional warning, but we cannot foreclose that possibility," Ricciardone wrote in the memo released among a cache of State Department documents obtained by the website Wikileaks.

IRI was never told about Ricciardone's concerns, spokeswoman Lisa Gates said.

In 2006, Egyptian officials ordered the U.S.-backed democracy programs to scale back work in the country after a newspaper quoted IRI's Cairo-based director in an article titled, "IRI Director Gina London: It's Our Right to Work in Egypt Without Prior License." The article quoted London as being critical of the Egyptian government's democracy efforts, comments that some Egyptian leaders viewed as insults from Americans who "come here and tell Egyptians how to think," according to a June 2006 secret State Department memo outlining reaction to the uproar.

IRI, NDI and other democracy groups scaled back their training programs in Egypt significantly after that, instead offering classes overseas.

After the spring uprisings and Mubarak's ouster, the U.S. piled millions more into its democracy promotion in Egypt, hoping to expand efforts with direct grants to big and small groups despite years of arguments with Egyptian leaders over the practice.

The U.S. quickly approved a one-time democracy development infusion of $65 million, drawn mostly from Egyptian aid withheld because promised improvements weren't made. The money went directly to IRI, NDI and other democracy groups, including Egyptian organizations considered more liberal and more inclined to challenge Islamic interests.

"I think a lot of people thought that this was a community that demonstrated its political commitment to a democratic future that we could support. And we should support them more, yes," the senior State Department official said.

The official said those in the Obama administration supporting that decision argued it was the right thing to do because groups backed by the military didn't need U.S. help; the Muslim Brotherhood, already surging in political popularity with a strong national network, didn't need U.S. support; and the remnants of the Mubarak regime didn't need training to organize politically or manage a political campaign.

"The liberal groups, the women's groups, we wanted them to form a coalition government, but that was never going to happen," said another U.S. official.

IRI leaders said they decided to exclude groups tied to the Muslim Brotherhood for similar reasons.

"The decision was made to focus our efforts on those smaller, weaker parties in the initial phase," said Scott Mastic, IRI's Middle East region director.

Mastic supervised the work done by Sam LaHood, IRI's director in Egypt who was among the group of democracy workers earlier this year accused of illegally operating and receiving foreign aid. The Egyptian government initially prohibited LaHood and other Americans charged from leaving the country, causing an international crisis that led to U.S. threats to withhold $1.5 billion in economic and military aid. But that controversy fizzled after Egypt allowed the Americans to return home and the U.S. handed over some of the aid money.

Mastic disputed claims by Soulam and other workers who resigned that the group practiced partisanship by excluding Brotherhood followers. IRI worked with some Islamist groups, he said.

"I guess what I would say is, if we worked with one party, then yes, I guess you could say that. But we didn't. We worked with lots of parties," he said.

Hany Nasr, a 26-year-old Egyptian lawyer in Cairo, said he resigned from IRI, in part, because he didn't think it was fair to help certain groups over Islamic organizations.

"Even though I completely disagree with the Islamists' point of view in politics, you say I have to be nonpartisan. So I really have to be nonpartisan," Nasr said in a telephone interview.

Mastic argued the employees who resigned represent only a small number of the 52 Egyptians who worked for the organization. He disputed claims that the group collected sensitive religious information from Egyptians as part of its political polling to send to Washington. Some information was collected to identify the traits of the Egyptians surveyed such as gender and age, Mastic said, but it wasn't shared with anyone outside IRI.

The interviewers conducting the face-to-face polling last year for IRI noted whether Egyptians questioned were Muslim or Christian by observing things such as American-style clothing, men wearing beards, women wearing more conservative Abbaya cloaks or head covers.

Some of the democracy programs may have had problems, but it's unfair to argue complaints against IRI are evidence of widespread trouble with democracy development in Egypt, said Sherif Mansour, a former Freedom House democracy worker in Egypt who is among the non-governmental organization employees charged.

"To make that representative for NGOs, or even representative for U.S. foreign policy. I think it's just part of the smear campaign against civil society," Mansour said. He resigned from Freedom House in Washington so he could face trial in Egypt.

As the U.S. lined up groups to share the $65 million, Egyptian leaders bristled at how they were bypassed. Aboulnaga, the minister who regularly complained about U.S. financing of democracy groups, led the charge to shut down the effort. Egyptian officials had refused to approve licenses for IRI, NDI and other groups.

Authorities began an investigation last summer and gathered evidence for the trial that they argue shows the groups operated illegally without licenses. "Our friends must understand that Egypt will never be the same, that this is an Egyptian revolution and that the Egyptian people will determine its outcome," Aboulnaga wrote in an editorial she circulated among American newspapers.

Mastic said he believes Aboulnaga struck out against IRI and other democracy groups receiving American money because the U.S. went around her ministry to distribute aid directly to the organizations. She had "railroaded funds to organizations that were tied to the Mubarak regime" when he was in power and now was challenging more established groups, he said.

"Now rebranding herself as some sort of champion of revolution is preposterous, really," Mastic said.

U.S. officials had no idea that Aboulnaga, their biggest critic of American-backed democracy promotion under Mubarak's regime, would survive the uprising and the military government created in its wake, the State Department official said.

"Nobody was anticipating the resurrection of the security state," the official said. "Nobody was fully debating the tenacity of this ministry, that she would be as effective as she was. It never occurred to anybody that this ministry was going to become the most powerful political agent in Egypt over the subsequent year."

Wisner, the former ambassador, traveled to Egypt last year at President Barack Obama's request to meet with Mubarak as protesters demanded the leader's resignation.

The U.S. could have avoided many of its problems in Egypt after the uprising had officials paid more attention to just how poorly its push to expand democracy development in Egypt was received, he said.

"Our intrusions into the political scene were just going to catch hell," Wisner said. "It was the wrong time to be barging into the kitchen. It was full of Egyptian cooks and they didn't want anyone from the outside."


IRI workers' resignation letter: http://hosted.ap.org/specials/interactives/documents/egypt-resignation-letter.pdf

Secret State Department cables: http://hosted.ap.org/specials/interactives/documents/egypt-wikileaks.pdf

Follow Brett J. Blackledge on Twitter: http://twitter.com/brettblackledge

Follow Desmond Butler at http://twitter.com/desmondbutler