A woman speaks on her phone as she walks past the Bombay Stock Exchange building in Mumbai.Reuters

After putting up a lacklustre performance last week, domestic stock markets surged on Monday as the European leaders agreed to extend a bailout package to highly indebted Greece for the third time in the past five years.

The benchmark BSE Sensex rose sharply by over 340 points or 1.23% to regain the psychological 28,000-mark.

Earlier in the day, the eurozone leaders accepted to lend yet another bailout package to Greece that will cover its financial needs in the next three years and mandated the country to initiate severe austerity measures in exchange.

"We think that the impact of these events on Indian economy would be small. This is because India has very little direct or indirect exposure to Greece," Pankaj Sharma, executive director and head of equities, Equirus Securities, told The Economic Times.

"However, from sentiment perspective, any deal on this issue is positive for Indian markets," he said.

Among the sectoral indices, BSE IT index was the top performer gaining by almost 1.7%, underpinned by the prospects of more order inflows into domestic IT companies from the European region on easing concerns over Greek debt situation.

Share prices of HCL Technologies, which earns more than a third of its revenues from Europe, rose about 4% to close at Rs 960.70 on the BSE. Stock prices of TCS, Infosys and Wipro went up by more than 1.2% each.

Share prices of automobile companies, which have high exposure to Greece, such as Bharat Forge and Motherson Sumi also rose by over 4%. However, share prices of Tata Motors remained almost unchanged from the previous session.