WASHINGTON — President Trump’s advisers are debating an order intended to designate the Muslim Brotherhood as a foreign terrorist organization, targeting the oldest and perhaps most influential Islamist group in the Middle East.

A political and social organization with millions of followers, the Brotherhood officially renounced violence decades ago and won elections in Egypt after the fall of President Hosni Mubarak in 2011. Affiliated groups have joined the political systems in places like Tunisia and Turkey, and President Barack Obama long resisted pressure to declare it a terrorist organization.

But the Brotherhood calls for a society governed by Islamic law, and some of its former members and offshoots — most notably Hamas, the Palestinian group whose stated goal is the destruction of Israel — have been tied to attacks. Some advisers to Mr. Trump have viewed the Brotherhood for years as a radical faction secretly infiltrating the United States to promote Shariah law. They see the order as an opportunity to finally take action against it.

Officially designating the Brotherhood as a terrorist organization would roil American relations in the Middle East. The leaders of some American allies — like Egypt, where the military forced the Brotherhood from power in 2013, and the United Arab Emirates — have pressed Mr. Trump to do so to quash internal enemies, but the group remains a pillar of society in parts of the region.