As President Barack Obama prepares to leave office and step down as commander-in-chief of America’s military, a flap has erupted over the secretive commandos who have become his go-to counterterrorist force across the globe.

Obama’s foreign military policy has centered on the targeted killings of terror suspects — usually by drone strikes — and he has ordered such actions in countries including Iraq, Syria, Somalia, Yemen and Libya.

But when it comes to ground action, the president has steered away from large-scale troop deployments and favored the light footprint offered by America’s hush-hush Special Operations Command (SOCOM).

The current kerfuffle stems from a Washington Post story that said SOCOM, specifically its super-secret wing called the Joint Special Operations Command (JSOC), is being granted new powers to track and potentially attack terror cells around the world.

The Post said JSOC could in some cases even operate unilaterally, without having to go through the regular US military command structure responsible for operations across particular parts of the world.

The reported move ruffled feathers in other military units and among government agencies such as the CIA that also track foreign jihadists.

They worried JSOC was being granted too much authority.

It “has caused for some friction in (the) government,” a senior military official said, speaking on condition of anonymity.

So this week, senior Pentagon officials moved to tamp down the story, saying SOCOM was not getting new powers, and that it would continue to operate within the long-established command structures.

Though secretive by trade, SOCOM has gained wide celebrity in America thanks to the countless books and movies depicting raids by its various teams.

This has long been a source of resentment for other military units, which sometimes feel overlooked when it comes to getting credit for America’s counterterrorism efforts.

Perhaps the most famous raid involving SOCOM fighters was the May 2011 assault by Navy SEALs that killed Osama bin Laden in Pakistan.