Feb 27 (Reuters) - Automotive parts retailer AutoZone reported a better-than-expected quarterly profit on Tuesday, helped by a Do-It-Yourself(DIY) trend among customers wanting to keep their older cars on the road.

Demand for auto parts stayed resilient during the quarter as surging prices of new and used vehicles discouraged some buyers from buying new ones.

The Memphis, Tennessee-based company has also benefited from some motorists staying away from modern, tech-heavy cars in favor of older model vehicles.

"While a difficult holiday comparison for both Christmas and New Year's negatively impacted quarterly sales performance, we continue to be encouraged with our sales initiatives and believe we are well positioned for future growth," AutoZone's CEO Phil Daniele said.

Its overall second-quarter revenue rose 4.6% to $3.86 billion compared to analysts' average estimate of $3.84 billion, according to LSEG data.

Excluding items, AutoZone earned $28.89 per share, compared to $24.64 a year earlier, also beating LSEG estimates of $26.28 per share.

Two weeks back, rival parts supplier O'Reilly Automotive also reported quarterly earnings ahead of Street estimates.

(Reporting by Pratyush Thakur and Nathan Gomes in Bengaluru)