This paper derives and estimates a structural model for inflation in an open economy. The model represents the standard new-Keynesian Phillips curve (NKPC) and the hybrid curve proposed by Woodford (2003) and Galí and Gertler (1999) as special cases. We present two sets of estimates for the Brazilian economy, initially regarded as a closed economy and then as a small open economy. According to the recent literature, the model contemplates indexation to past inflation and a measure of marginal cost as relevant inflation indicators. Some of the results can be summarized as follows: (i) Brazil, when regarded as a closed economy, has a relatively higher level of nominal rigidity than that of the United States and Europe, and a high level of indexation as well; (ii) In an open economy with indexation, nominal exchange rate appreciation plus foreign inflation affects consumer inflation, and this effect becomes more intense with larger economic openness; (iii) There is a small direct impact of the variables associated with economic openness, with the sum of their coefficients being close to zero; (iv) However, the indirect impact is significant, consistently changing the weights associated with lagged inflation and the expected future inflation.