Inflation remained stubbornly high in August — and economists said consumers are likely to continue to feel the financial pain in coming months as tensions flare in the Middle East, driving up gasoline and other energy costs.

The consumer price index, a measure of inflation, rose 3.4% on an annual basis in August, unchanged from July, according to data issued Friday by the Bureau of Labor Statistics.