WASHINGTON -- The U.S. is actively considering talks with elements of the Taliban, the armed Islamist group that once ruled Afghanistan and sheltered al Qaeda, in a major policy shift that would have been unthinkable a few months ago.

Senior White House and military officials believe that engaging some levels of the Taliban -- while excluding top leaders -- could help reverse a pronounced downward spiral in Afghanistan and neighboring Pakistan. Both countries have been destabilized by a recent wave of violence.

The...