Jan 25 (Reuters) - Chipmaking tools manufacturer KLA Corp forecast third-quarter revenue below Wall Street estimates on Thursday, signaling sluggish demand in the electronics segment.

Shares of the California-based company fell more than 5% in aftermarket trading.

Despite rising demand for equipment for making artificial intelligence chips, firms such as KLA are grappling with persistent weakness in certain markets.

CEO Rick Wallace said market conditions "remain challenging in the near term".

A recovery in the memory chips market is expected this year as prices rebounded in the December quarter after production cuts and the trend is expected to extend.

Surge in the spending on dynamic random access memory (DRAM) - a memory chip used to store data temporarily, will also help KLA, brokerage Berenberg said last week.

KLA also faces competition from other chipmaking equipment suppliers such as Applied Materials and Europe's largest technology company by market value ASML Holding .

Earlier in January, Samsung Electronics, which is KLA's customer, reported a likely 35% drop in fourth-quarter operating profit in its preliminary results, much worse than analysts expected.

KLA expects revenue of $2.30 billion plus or minus $125 million for third-quarter ending in March, compared with analysts' average estimate of $2.46 billion, according to LSEG data.

It expects third-quarter adjusted profit per share of $5.26 plus or minus $0.60, compared with estimates of $5.85.

The company posted second-quarter revenue of $2.49 billion, beating estimates of $2.46 billion. Excluding items, profit per share came in at $6.16, beating estimates of $5.91. (Reporting by Jaspreet Singh in Bengaluru; Editing by Sriraj Kalluvila)