The emergence of petawatt lasers focused to relativistic intensities enables all-optical laboratory generation of intense magnetic fields in plasmas, which are of great interest due to their ubiquity in astrophysical phenomena. In this work, we study generation of spatially extended and long-lived intense magnetic fields. We show that such magnetic fields, scaling up to the gigagauss range, can be generated by interaction of petawatt laser pulses with relativistically underdense plasma. With three-dimensional particle-in-cell simulations we investigate generation of magnetic fields with strengths up to $$10^{10}$$
10
10
G and perform a large multi-parametric study of magnetic field in dependence on dimensionless laser amplitude $$a_{0}$$
a
0
and normalized plasma density $$n_{e}/n_{c}$$
n
e
/
n
c
. The numerical results yield scaling laws that closely follow derived analytical result $$B \propto \sqrt{a_{0}n_{e}/n_{c}}$$
B
∝
a
0
n
e
/
n
c
, and further show a close match with previous experimental works. Furthermore, we show in three-dimensional geometry that the decay of the magnetic wake is governed by current filament bending instability, which develops similarly to von Kármán vortex street in its nonlinear stage.