WASHINGTON — The Obama administration is preparing to carry out a campaign against the Islamic State in Iraq and Syria that may take three years to complete, requiring a sustained effort that could last until after President Obama has left office, according to senior administration officials.

The first phase, an air campaign with nearly 145 airstrikes in the past month, is already underway to protect ethnic and religious minorities and American diplomatic, intelligence and military personnel, and their facilities, as well as to begin rolling back ISIS gains in northern and western Iraq.

The next phase, which would begin sometime after Iraq forms a more inclusive government, scheduled this week, is expected to involve an intensified effort to train, advise or equip the Iraqi military, Kurdish fighters and possibly members of Sunni tribes.

The final, toughest and most politically controversial phase of the operation — destroying the terrorist army in its sanctuary inside Syria — might not be completed until the next administration. Indeed, some Pentagon planners envision a military campaign lasting at least 36 months.