Ed, if this is an anvil closet, an auto parts closet, or a concrete block closet, and as the OP says all the clearances are there, he can install the panel in this space.
The OP seems to be aware of 240.24(D) and the requirements 110.26 by the way he worded the question.
Roger