The Russian Revolution of 1917 had dual effect on the gallery. Collapse of the monetary system and city utilities brought the gallery to a "really catastrophic condition" that was barely improved by nationalization in June 1918. At the same time the gallery collection rapidly grew, absorbing nationalized private and church collections and formerly independent small museums. One by one its own exhibition halls were converted into art warehouses and closed to the public. By 1924, the gallery operated four affiliate halls, in 1925 it disposed with foreign masters, but these measures could not offset the inflow of new stock. Physical expansion of the building became a first priority, and in 1926 Grabar was replaced with architect Aleksey Shchusev.