Using numerical methods, we construct a solution to a physically and geometrically nonlinear problem of three-point bending of an elastic beam, made of porous metal, with rectangular cross-section. Unlike the classical version of the problem for a homogeneous beam, the heterogeneity over the cross-section due to material compaction because of the collapse of pores, which occurs in the compression zone at sufficiently large deflections, is taken into account. To describe the elastic state of a porous metal, the stress – strain diagram of a bimodular medium is used. The results of computations of strong bending of a beam, made of the low-porosity aluminum foam, are presented. These results demonstrate the difference between the obtained solution and similar solutions for beams, made of homogeneous porous and compacted material.