We construct and estimate by maximum likelihood a job search model where wages are set by Nash bargaining and idiosyncratic productivity follows a geometric Brownian motion. The proposed framework enables us to endogenize job destruction and to estimate the rate of learning-by-doing. Although the range of the observations is not independent of the parameters, we establish that the estimators satisfy asymptotic normality. The structural model is estimated using Current Population Survey data on accepted wages and employment durations. We show that it accurately captures the joint distribution of wages and job spells. We find that the rate of learning-by-doing has an important positive effect on aggregate output and a small impact on employment. Copyright © 2009 John Wiley & Sons, Ltd.