We assess the empirical relevance for inflation dynamics of accounting for the presence of search frictions in the labor market. The New Keynesian Phillips curve explains inflation dynamics as being mainly driven by current and expected future marginal costs. Recent empirical research has emphasized different measures of real marginal costs to be consistent with observed inflation persistence. We argue that, allowing for search frictions in the labor market, real marginal cost should also incorporate the cost of generating and maintaining long-term employment relationships, along with conventional measures, such as real unit labor costs. In order to construct a synthetic measure of real marginal costs, we use newly available labor market data on worker finding and separation rates that reflect firing and hiring costs to the firm. We then estimate a New Keynesian Phillips curve using structural econometric techniques.