President Obama's Department of Homeland Security Wednesday stepped up and did the right thing -- rewarding a true hero.

In a San Diego immigration courtroom, DHS dropped its opposition to Palestinian expatriate Mosab Hassan Yousef's asylum request.

Pending a background check, Yousef's request will likely be granted.

The Post first reported on Yousef back in February, just days before the publication of his "Son of Hamas" memoir that detailed the prison transformation of a young Arab militant whose father was a founder of the terrorist group.

Mosab Hassan Yousef

AP

Mosab Hassan Yousef

After being captured, Yousef became a warrior against terrorism and, upon his release, served for a decade as Israeli intelligence's most reliable informant.

His tips led to the arrests of dozens of Hamas terrorists, saving hundreds of lives by disrupting plots.

Three years ago, Yousef moved to California and revealed both his identity and conversion to Christianity.

DHS last year rejected Yousef's asylum request and worked to deport him, claiming his memoir showed his providing Hamas with "material support" -- which was actually just bait to break up plots that included several suicide bombings.

Wednesday's reversal suggests wiser heads prevailed.

Congratulations to Yousef.

This "son of Hamas"-turned-friend-of-Israel-turned-American-resident well deserves his pre-Independence Day gift.