The magnetoelectric behavior of BiFeO3 has been explored on the basis of accurate density functional calculations. We are able to predict structural, electronic, magnetic, and ferroelectric properties of BiFeO3 correctly without including any strong correlation effect in the calculation. Unlike earlier calculations, the equilibrium structural parameters are found to be in very good agreement with the experimental findings. In particular, the present calculation correctly reproduced experimentally-observed elongation of cubic perovskite-like lattice along the [111] direction. At high pressure we predicted a pressure-induced structural transition from rhombohedral (R3c) to an orthorhombic (P nma) structure. The total energy calculations at expanded lattice show two lower energy ferroelectric phases (with monoclinic Cm and tetragonal P 4mm structures), closer in energy to the ground state phase. Spin-polarized band-structure calculations show that BiFeO3 will be an insulator in A-and G-type antiferromagnetic phases and a metal in C-type antiferromagnetic, ferromagnetic configurations, and in the nonmagnetic state. Chemical bonding in BiFeO3 has been analyzed using partial density-of-states, charge density, charge transfer, electron localization function, Born-effective-charge tensor, and crystal orbital Hamiltonian population analyses. Our electron localization function analysis shows that stereochemically active lone-pair electrons are present at the Bi sites which are responsible for displacements of the Bi atoms from the centro-symmetric to the noncentrosymmetric structure and hence the ferroelectricity. A large ferroelectric polarization of 88.7 µC/cm 2 is predicted in accordance with recent experimental findings, but differing by an order of magnitude from earlier experimental values. The strong spontaneous polarization is related to the large values of the Born-effective-charges at the Bi sites along with their large displacement along the [111] direction of the cubic perovskite-type reference structure. Our polarization analysis shows that partial contributions to polarization from the Fe and O atoms almost cancel each other and the net polarization present in BiFeO3 mainly (> 98%) originates from Bi atoms. We found that the large scatter in experimentally reported polarization values in BiFeO3 is associated with the large anisotropy in the spontaneous polarization.