It was the deadliest terrorist attack Egypt has faced in the modern era. A group of two dozen Islamist extremists, riding in SUVs and loaded with enough explosives, weapons, and bullets to lead a platoon, surrounded a Sufi mosque in the northern Sinai town of Bir al-Abed and opened fire. Positioning themselves by the exit and entry points of the mosque and along the windows, the militants detonated explosives and started spraying bullets at worshipers inside. Those who tried to escape the violence were blocked by burning vehicles the militants set on fire. Ambulances sent to the scene were fired upon.

By the time the assault ended, 305 people lay dead, Egypt’s government vowed extreme vengeance and revenge for those who were killed, and an entire nation was left shocked at the horrific violence.

If the Trump administration has not yet been asked for counterterrorism assistance to deal with the aftermath of this attack, it soon will be. While Cairo fights terrorism with sweeping arrests, states of emergency, increased roadblocks, air strikes, civilian evacuations, and the deployment of additional troops and police officers, the Egyptian government often asks for help. As a strategic U.S. ally, it is more than appropriate for the administration to assist Cairo with an investigation by dispatching U.S. law enforcement officials. Indeed, the FBI has performed this work on numerous occasions since the 1998 U.S. embassy bombings in Kenya and Tanzania.

What Washington shouldn’t do is transform Egypt’s counterterrorism campaign in the Sinai into a U.S. campaign.

For a country already suffering from a multitude of internal problems — a high population growth rate, a stagnant, military-dominated economy, increasing authoritarianism, and youth joblessness — the Sinai Peninsula is Egypt’s problem child. Sinai residents remain culturally, economically, and politically cut off from the rest of Egypt. Economic prospects are greatly dependent on smuggling routes, Bedouins that inhabit the area are unable to enlist in the army, and with some Sinai tribesmen being recruited into jihadist ranks, Cairo has conducted operations on the assumption that Sinai’s tribes are either part of the Islamic State, supporting the group in some way, or tolerant of their presence.

The security situation in the Sinai is precarious. Despite thousands of Egyptian troops and a greater military focus on the region, the Egyptian security forces remain as vulnerable to attacks as the congregants in that Sufi shrine days ago. Hundreds of soldiers and police have been killed in jihadist ambushes over the last four years, including an attack on a military base in July that killed 23 troops and another in September on a police convoy that killed 18. Security forces are at the mercy of militants who have far more knowledge of Sinai’s terrain and social demographics.

The U.S. doesn’t benefit from adding more firepower to the situation, nor should it do in the Sinai what it has done in Iraq and Syria — deploy artillery on the ground in support of local forces and embed several hundred special operations advisers and joint tactical aircraft controllers into Egyptian army units. If there were a military solution to Sinai’s terrorism problem, al Qaeda and ISIS would have been extinguished from the desert a long time ago.

What the U.S. can do, and seriously should consider, is assist Cairo with doctrine and strategy: what tactics should be used, which should be avoided, and what reforms Abdel Fattah el-Sisi's government can implement that would begin to repair the massive gap in trust between the Egyptian army and the Sinai population.

Many of these recommendations would be obvious and have been written about by Egypt scholars for years. Substituting mass arrests of adult males and their family members with targeted operations based on concrete intelligence information would be one small but potentially effective reform, as would eliminating the government's tolerance for extrajudicial executions of suspects in the army’s custody. Not one of these tactics have provided Cairo with the local knowledge base it requires to uproot jihadists in a vast area about the size of West Virginia. To the contrary, harsh security measures have only eroded the relationship between Egyptian security forces and the tribal elements who serve as vital sources of information who is picking up guns on behalf of ISIS.

Demolishing homes to clear the way for military zones and requiring families to leave the area without recourse engenders nothing but distrust and resentment among the very people the Egyptians need for local intelligence. The “scorched-earth tactics” the army has used have caused more problems than they have solved. If they worked, attacks would be down, not generating international headlines.

President Sisi must also carry some carrots in his pocket along with his sticks. Social and political reforms must accompany more evenhanded and discriminate military measures. Bedouin tribes can no longer be stigmatized as jihadist collaborators or enemies of the state, as they have been treated for decades. Somehow, someway, economic opportunity must be introduced so residents of northern Sinai are not compelled to make the choice between living in destitution and contributing to terrorist activity by enlisting or through smuggling.

But just as critical, the Egyptians will have to do this for themselves. Militant activity and extremism in the Sinai Peninsula is an Egyptian and regional problem, but it is not a threat to American security. Egypt should work with its neighbors so that local jihadism can be countered in that part of Egypt.

Washington can help Cairo in a humble way, but under no circumstances should President Trump send the Green Berets to the desert. As bad as the attack on the Sufi mosque was, the U.S. must resist the temptation of solving Sinai’s economic, political, and security issues for the Egyptian government. The American public doesn’t want their fathers, mothers, sons, or daughters patrolling yet another desert in the Arab world, particularly one in the middle of a localized conflict.

Daniel DePetris (@DanDePetris) is a contributor to the Washington Examiner's Beltway Confidential blog. He is a fellow at Defense Priorities.

If you would like to write an op-ed for the Washington Examiner, please read our guidelines on submissions here.