CAIRO — Egypt's arrest of a U.S.-born Israeli on suspicion of spying for the Mossad is providing fodder for the Arab nation's military rulers to accuse outsiders of stirring post-revolutionary turmoil.

The accusations against an American law student harken back to an era, not that long ago, when Egyptian leaders justified repression by claiming the country was under constant siege by foreign conspirators.

The arrest of 27-year-old Ilan Grapel comes at a time when the military faces growing criticism of how it is running the country. It resonates among many Egyptians looking for someone outside to blame for the instability, crime and economic troubles that date to the February ouster of longtime authoritarian ruler Hosni Mubarak.

Some in Egypt think the allegations that Grapel was an undercover operative are flimsy at best. Israel denied them on Tuesday. And a Facebook group called "The Stupid Israeli Spy" mocks the media reports about his activities.

Newspapers published his photographs in an Israeli uniform. He was also pictured with protesters in Cairo's Tahrir square, the epicenter of the uprising that toppled Mubarak, as well as taking a nap inside a Cairo mosque and posing in Arab head gear in front of a pyramid.

Another one showed him on a hospital bed after he was wounded in Israel's 2006 war against Lebanon's Shiite Hezbollah guerrillas.

The photos were lifted from Grapel's Facebook page.

"There goes the business of espionage," one person wrote in "The Stupid Israeli Spy" group. "All what was left for him (Grapel) was to wear a T-shirt that says 'spy' on its front."

The newspapers, publishing leaks from Egypt's intelligence agency, allege Grapel was a Mossad spy sent to Egypt to report on post-Mubarak conditions, incite protesters against the country's military rulers and stir up trouble between Muslims and Christians.

Grapel's relatives and friends said he is a law student in Atlanta with an avid interest in the Middle East. His family has Israeli roots and he holds dual American-Israeli citizenship.

Grapel appears to have been traveling under his real name and made no secret of his Israeli links. His connections to Israel, including his past military service, are easy to find on the Internet, adding to doubts that he was a Mossad agent.

A Cairo friend of Grapel said the suspected spy acted naively while in Egypt, where he interned with a non-governmental agency helping refugees.

"He would openly consult his Hebrew-Arabic dictionary in cafes, taught Hebrew to an Egyptian and read Hebrew newspapers on his laptop for everybody to see," said the friend, who spoke to The Associated Press on condition of anonymity because he feared attracting the attention of authorities.

Fiona Cameron, the acting director of St. Andrew's Refugee Services, told the AP that Grapel joined the agency on June 5 after a week's training and described him as "a pleasant young man."

Whether or not Grapel is a spy, his case is symptomatic of new and subtle tensions between Egypt and Israel as the Arab nation's post-Mubarak rulers move away from the policies the former leader adopted. Most Egyptians see Israel as their country's foremost enemy despite a peace treaty signed in 1979 that came six years after the two nations fought the last of four wars since 1948.

While vowing to honor the country's international commitments, a thinly veiled reference to the 1979 treaty, Egypt's new rulers have improved ties with Iran, reopened borders with Gaza and reached out to Hamas.

"I cannot believe that Egypt would fabricate a story like this," said Khaled Salah, editor of the daily al-Youm al-Sabea, or seventh day. "Egypt can't play games like this right now. There are many reasons to believe Egypt might be targeted."

Israeli Foreign Minister Avigdor Lieberman denied Tuesday that Grapel was a spy, and a senior Egyptian official told The Associated Press that Grapel also denied the charges during his interrogation.

Speaking on Israel's Army Radio, Lieberman said Grapel "has no connection to any intelligence agency, not in Israel, not in the U.S. and not on Mars."

Just days before the arrest of Grapel, Egyptian authorities detained an Iranian diplomat and accused him of spying on Egypt following the uprising, reflecting a growing nervousness about how Egypt's neighbors perceive the massive changes that have swept the country.

Rights groups accuse the military of torturing detainees and criticize the use of military tribunals to try civilians. The generals, in turn, are raising pressure for positive news coverage and calling for people to rally behind them at what they describe as a perilous time.

Against this backdrop, the case of the suspected Israeli spy could be a convenient distraction.

It also could also be an attempt to chip away at the prestige and respect enjoyed by the country's young "revolutionaries" by portraying some of them as naive enough to allow an Israeli agent to operate freely in their midst.

"This is nonsense. It's an attempt to distract the people and question the revolution," said Sarah Kamal, an activist from one of the key groups behind the uprising. "They want to say those who protested were traitors and agents."

Many of the protesters arrested in the early days of the uprising later reported that their interrogators asked them whether they had been supported by Israel or Iran.

Salama Ahmed Salama, one of Egypt's most respected columnists, held out the possibility that the case could have been used to divert attention from Egypt's — and the military's — troubles.

"But you still cannot just rule out that he could also be a spy," he said.

Eli Shaked, a former Israeli ambassador to Egypt, recalled years of sensational reports in Cairo's independent press about Israel's meddling in the Arab nation's affairs, from sending women to seduce Egyptian men, to spreading the HIV virus and poisoning farm produce.

"I called Cairo the world conspiracy center, " he told the AP in Jerusalem. "As an ambassador in Cairo, we had many, many cases in which we were notified that an Israeli had been arrested on allegations of espionage, drug running, AIDS dissemination, and a few days later they would be released."

Associated Press reporters Sarah El Deeb and Diaa Hadid in Cairo and Amy Teibel in Jerusalem contributed to this report.