CAIRO — Egypt’s military-led government said Sunday that it would put 19 Americans and two dozen others on trial in a politically charged criminal investigation into the foreign financing of nonprofit groups that has shaken the 30-year alliance between the United States and Egypt.

The decision raises tensions between the two allies to a new peak at a decisive moment in Egypt’s political transition after the ouster of President Hosni Mubarak a year ago. Angry protesters are battling security forces in the streets of the capital and other major cities. The economy is in urgent need of billions of dollars in foreign aid. And the military rulers are in the final stages of negotiations with the Islamists who dominate the new Parliament over the terms of a transfer of power that could set the country’s course for decades.

The criminal prosecution is a rebuke to Washington in the face of increasingly stern warnings to Egypt’s ruling generals from President Obama, cabinet officials and senior Congressional leaders that it could jeopardize $1.55 billion in expected American aid this year, including $1.3 billion for the military. But for Washington, revoking the aid would risk severing the tie that for three decades has bound the United States, Egypt and Israel in an uneasy alliance that is the cornerstone of the American-backed regional order.

Secretary of State Hillary Rodham Clinton said she had personally warned the Egyptian foreign minister, Mohammed Amr, at a security conference in Munich on Saturday that the continuing investigation of the nonprofit groups cast new doubt on the aid. “We are very clear that there are problems that arise from this situation that can impact all the rest of our relationship with Egypt,” she told reporters there.