We present a reconfigurable hierarchical And-Or model to integrate context and occlusion for car detection in the wild. The model structure is learned by mining context and viewpoint-occlusion patterns at three levels: a) N-car layouts, b) single car and c) car parts. Our model is a directed acyclic graph (DAG) where dynamic programming (DP) algorithm can be used in inference. The model parameters are learned by weak-label Structural SVM. Experimental results show that our model is effective in modelling context and occlusion information in complex situations, and obtains better performance over state-of-the-art car detection methods.