WASHINGTON — Just 10 days after leaving office, former President Obama spoke out against President Trump’s policies Monday and said he was “heartened” by the level of protests against them.

In his first statement since leaving office, Obama took aim at Trump’s travel ban against refugees and residents of seven Muslim countries by characterizing the action as a religious test.

“The president fundamentally disagrees with the notion of discriminating against individuals because of their faith or religion,” Obama spokesman Kevin Lewis said in a statement.

In his final days in office, Obama said he wanted to give Trump space to lead, but that he’d speak up when he believed democracy and US values were being challenged.

“President Obama is heartened by the level of engagement taking place in communities around the country,” Lewis said.

“Citizens exercising their constitutional right to assemble, organize and have their voices heard by their elected officials is exactly what we expect to see when American values are at stake.”