Context : Black-hole transients , as a class , exhibit during their outbursts a correlation between the time lag of hard photons with respect to softer ones and the photon index of the hard X-ray power law . The correlation is not very tight and therefore it is necessary to examine it source by source . Aims : The objective of the present work is to investigate in detail the time-lag – photon-index correlation in GX 339-4 , which is the best studied black-hole transient . Methods : We have obtained RXTE energy spectra and light curves and have computed the photon index and the time lag of the 9 - 15 keV photons with respect to the 2 - 6 keV ones . The observations cover the first stages of the hard state , the pure hard state , and the hard-intermediate state . Results : We have found a tight correlation between time lag and photon index \Gamma in the hard and hard-intermediate states . At low \Gamma , the correlation is positive and it becomes negative at large \Gamma . By assuming that the hard X-ray power law index \Gamma is produced by inverse Compton scattering of soft disk photons in the jet , we have reproduced the entire correlation by varying two parameters in the jet : the radius of the jet at its base R _ { 0 } and the Thomson optical depth along the jet \tau _ { \parallel } . We have found that , as the luminosity of the source increases , R _ { 0 } initially increases and then decreases . This behavior is expected in the context of the Cosmic Battery . Conclusions : Our jet model nicely explains the correlation with reasonable values of the parameters R _ { 0 } and \tau _ { \parallel } . These parameters also correlate between themselves . As a further test of our model , we predict the break frequency in the radio spectrum as a function of the photon index during the rising part of an outburst .