Many investors stayed away because of rising interest rates.
The main index ended 0.26 percent or 14.85 points higher at 5,722.86, its highest close since Feb. 22.
Analysts said many domestic investors stayed on the sidelines as yields on treasury bills rose for the second week on Wednesday even though the central bank kept its key policy rates unchanged for a third straight month.
Analysts also said retailers were worried about the effect of allegations Sri Lanka faces at the U.N. Human Rights Council in Geneva over the conduct of its military in the final stages of the 2009 defeat of Tamil Tiger separatists.
Shares in conglomerate John Keells Holdings rose 1.58 percent to 243.80 rupees.
Turnover was 933.6 million rupees ($7.39 million), less than this year's daily average of 1.02 billion rupees.
Foreign investors were net buyers of 221.8 million rupees worth of shares, extending the year-to-date net foreign inflow to 3.98 billion rupees worth of shares.
The rupee ended weaker at 126.55/65 to the dollar from Monday's close of 126.30/35. ($1 = 126.3000 Sri Lanka rupees)
(Reporting by Ranga Sirilal and Shihar Aneez)
(Reuters Messaging: email@example.com)(twitter.com/rangab a)