North Korea finally confirmed Tuesday that US soldier Travis King is being detained in the country — nearly a month after he bolted across the border.

King told investigators that he had decided to enter North Korea because he “harbored ill feelings against inhuman mistreatment and racial discrimination within the US Army,” officials said.

The 23-year-old also expressed his willingness to seek refuge in North Korea or a third country, saying he “was disillusioned at the unequal American society,” the North Korean official news agency, KCN, said in a statement.