Mumbai, July 21 -- Key equity benchmarks ended lower on Tuesday, with the Nifty closing below the 24,200 mark, weighed down by higher crude oil prices, continued FII selling, and weakness in HDFC Bank. Brent crude hovered around $90 a barrel amid ongoing Middle East tensions, fuelling concerns over inflation and corporate margins. Despite the decline in benchmark indices, midcap and smallcap stocks outperformed on stock-specific earnings optimism. Among sectoral indices, auto and metal shares advanced, while PSU banks, IT and energy stocks ended lower.

The S&P BSE Sensex declined 238.41 points or 0.31% to 77,470.11. The Nifty 50 index fell 50.80 points or 0.21% to 24,187.70.

HDFC Bank (down 2.07%), State Bank of India (down 1.48%) and R...