An optimal process plant layout needs to ensure that the associated piping and land costs are minimized, while the overall safety is maximized. Although various approaches to optimizing plant layout exists in the literature, none considers the essential need for simultaneous compliance with local risk regulations. Employing mixed‐integer nonlinear programming, this article presents a methodology to enable design of layout of a major hazard plant, while simultaneously achieving conformity with both applicable individual and societal risk acceptance criteria. The algorithm is applied to a model plant which poses hazards of toxic gas releases, fires, and explosions. Additional risks of domino effects due to fires and explosions are also incorporated. The results of the article suggest that the approach can be employed to automate any plant layout optimization exercise while ensuring regulatory compliance concurrently. The proposed approach can help substitute the iterative, manual process that is presently applied in practice.