Large-scale turbulence in fluid layers and other quasi-two-dimensional compressible systems consists of planar vortices and waves. Separately, wave turbulence usually produces a direct energy cascade, while solenoidal planar turbulence transports energy to large scales by an inverse cascade. Here, we consider turbulence at finite Mach numbers when the interaction between acoustic waves and vortices is substantial. We employ solenoidal pumping at intermediate scales and show how both direct and inverse energy cascades are formed starting from the pumping scale. We show that there is an inverse cascade of kinetic energy up to a scale ℓ, where a typical velocity reaches the speed of sound; this creates shock waves, which provide for a compensating direct cascade. When the system size is less than ℓ, the steady state contains a system-size pair of long-living condensate vortices connected by a system of shocks. Thus turbulence in fluid layers processes energy via a loop: Most energy first goes to large scales via vortices and is then transported by waves to small-scale dissipation.Inverse cascade is a counterintuitive process of selforganization of turbulence. Predicted almost simultaneously for two-dimensional (2D) incompressible flows [1] and sea wave turbulence [2] and established in many cases of turbulence in plasma, optics, etc. [3][4][5][6][7][8], it is predicated on the existence of two quadratic conserved quantities having different wave-number dependencies. Excitation at some intermediate wave number then leads to two cascades: a direct one to small scales and an inverse one to large scales. There is always a strong dissipation at small scales which acts as a sink for the direct cascade. On the contrary, large-scale motions are usually less dissipative, so that an inverse cascade can proceed unimpeded, either producing larger and larger scales or reaching the box size and creating a coherent mode of growing amplitude. That process is now actively studied in 2D incompressible turbulence [3,4,[9][10][11][12][13], including in a curved space, where vortex rings rather than vortices are created [14]. The energy of an incompressible flow in an unbounded domain grows unlimited when the friction factors go to zero at a finite energy input rate. The same happens to the action of wave turbulence [15], if long waves of large amplitude are stable. For example, optical turbulence in media with defocusing nonlinearity produces a growing condensate [7,8,16]. On the contrary, in the focusing case, condensate instability results in wave collapses which provide for a loop of inverse cascade to the small-scale dissipation so that there is a steady state with only small-scale dissipation [8].Here, we consider compressible two-dimensional turbulence which is of significant importance for numerous geophysical, astrophysical and industrial applications. We show that it realizes a third possibility of a steady state with only small-scale dissipation: On the one hand, an inverse cascade is able to produce long-living stable vorti...