Indian stock markets ended with gains on Wednesday, helped by the absence of large scale selling by foreign institutional investors (FIIs), enabling both Sensex and Nifty to hit their highest levels in three weeks.

The day was marked by the debut of Alkem Laboratories and Dr Lal PathLabs, which ended with gains of 31% and 53%, respectively on the BSE and saw heavy volumes.

The Alkem stock closed at Rs 1,381.45, a gain of 31% over its issue price of Rs 1,050, while Dr Lal PathLabs ended the day at Rs 824, a gain of Rs 49.81% over its issue price of Rs 550 per share.

The S&P BSE Sensex ended at 25,830, up 259.65 points, or 1.01%, while the broader NSE Nifty gained 79.85 points, or 1.03%, and ended at 7,865.

GAIL (India), BHEL, Sun Pharma, Tata Steel and ONGC were the top Sensex gainers.

Metal and mining stocks were in the limelight, tracking rising copper prices globally. Hindustan Zinc, JSW Steel, Jindal Steel, SAIL, Vedanta, Hindalco and Hindustan Copper registered moderate to heavy gains.

Sensex losers included Hero Motocorp, Adani Ports, Asian Paints and Bajaj Auto.

In other news, Honda Cars, like its peers, raised prices up to Rs 16,000 with effect from 1 January, 2016, citing rising input costs. Other car makers who have raised prices include Maruti Suzuki, Hyundai Motor India, Toyota Kirloskar Motor, BMW, Mercedes-Benz, GM, Tata Motors, Skoda, Nissan and Renault.

Some of the stock that hit 52-week high included Essar Oil, Mahindra Holiday, Trent, Aurobindo Pharma, Arvind Mills, Berger Paints and Jet Airways.