Long term tax on intraday transactions

If I sell my long-term holdings and buy the same shares again later on the same day, will it be considered an intraday transaction, or will my original long-term holdings be treated as sold and the shares purchased again be considered a new investment?

For example, I bought shares in 2021 at ₹500 per share and in 2026 I sell them at ₹2,500 per share. I sell the shares in the morning and buy them back before 3:30 PM on the same trading day. In this case, will my original long-term holding period and cost be maintained and the transaction treated as intraday, or will the original shares be considered sold (triggering long-term capital gains) and the newly purchased shares be treated as a fresh holding?

@TeamQuicko can anyone help me with this query

In my view, the purchase and sale transactions that took place on the same day will be considered as intraday transaction only. It wont be considered as Long term capital gain/loss and new purchase as you indicated.

Intraday trading profits are not eligible for long-term capital gains tax because the shares are bought and sold on the same day.
These profits are treated as speculative business income and taxed according to the applicable income tax slab.