His lawyer is challenging the grounds for his detention.