Within the space of a few days, voters went to the polls in Morocco and Egypt to elect parliaments. Although the context is dissimilar, the two countries and the United States face common challenges.

The Moroccan election is part of a governmental reform process initiated by the king that includes a new constitution, greater power for elected officials and devolution of authority to localities. The Associated Press reported: “The victory of an Islamist Party in Morocco’s parliamentary elections appears to be one more sign that religious-based parties are benefiting the most from the new freedoms brought by the Arab Spring. Across the Middle East, parties referencing Islam have made great strides, offering an alternative to corrupt, long serving dictators, who have often ruled with close Western support.” The report noted that the victorious Justice and Development Party won 107 of 395 seats in the Moroccan parliament.

The turnout was 45 percent, not as strong as for local elections in 2009 but better than the country’s last parliamentary elections (37 percent). That’s a respectable showing, but it also suggests the political parties have an ongoing challenge to show that elected bodies can affect the lives of ordinary Moroccans.

Many in the Western media characterize the Justice and Development Party (known by the PJD, its French initials) as a “moderate Islamist” party. But like most things in the region, it is more complicated than that. The PJD did not run on an “Islamist” platform and was successful in large part because of its political organization and its focus on good governance, transparency and delivery of services. In a country where women have been extended legal rights and the king remains a unifying figure, the PJD correctly sized up that an Islamist agenda would not fly there.

In its initial public statement after the election, the PJD leader declared, ”Religion belongs in the mosques and we are not going to interfere in people’s personal lives.”

Because the PJD did not obtain a majority, negotiations will take place to form a majority government. The resulting ruling coalition is expected to be broad.

The test for the PJD, as it is all over the region, is to see whether “one man, one vote, one time” is myth or reality. Islamic parties that come to power will need to answer a series of questions. Will there be toleration and respect for minorities and minority rights? Will elected leaders make good on their promise of good government, relatively free of corruption and able to provide jobs, education and medical care? Will these parties move toward autocratic, anti-Western rule or attempt to stay on the road to modernization?

Meanwhile, as the pot boils over in Egypt, with both internal and external critics demanding that the military government move more quickly toward civilian rule, the turnout for its parliamentary elections was huge. Reuters reported: “Egyptians voted on Monday in the first election since a popular revolt toppled Hosni Mubarak’s one-man rule, showing new-found faith in the ballot box that may sweep long-banned Islamists into parliament even as army generals cling to power. Voters swarmed to the polls in a generally peaceful atmosphere despite the unrest that marred the election run-up, when 42 people were killed in demonstrations demanding an immediate transition from military to civilian rule.”

There too Islamic parties — especially the Muslim Brotherhood — are expected to do well. Mubarak successfully repressed most secular political opposition, giving an advantage now to the only organized entities, the Islamic ones. Here too the Muslim Brotherhood and others will be tested to see if they will morph into a political operation that respects minorities, honors the rule of law, upholds its treaty obligations and allow for political dissent.

Once the voting is completed, the military regime, which was trained throughout the Mubarak years to view the Muslim groups as implacable foes, will need to assess the situation and respond to pressure to step up the pace of change.

The United States has a limited but critical role to play in these sorts of situations. While it is likely not effective for Washington to insert itself by demanding a specific timetable, the U.S. government can certainly apply diplomatic pressure and hold out the lure of improved relations, trade and investment if Egypt moves toward a more democratic system.

While the initial revolutions were dramatic events that drew the Western media’s attention to the Arab Spring countries, now may be an even more critical moment for U.S. policymakers. It’s fashionable now for politicians to vow to cut foreign assistance. It’s true that these countries must chart their own course. But the United States should be visibly and consistently on the side of reform and democratization, using the full array of diplomatic and economic tools at our disposal. If not, we will miss an historic opportunity (another one, as we did in Iran in June 2009 and following) to establish good relations with those pushing for more democratic regimes and respect for human rights. Failure to do that will result in the United States’ ever-diminishing influence in the region.