The main share index ended up 0.47 percent, or 27.69 points, at 5,923.34, edging up from its lowest close since April 22.
However, analysts said investors were cautious over a fall in the rupee and a weak earnings outlook. The local currency hit a one-year low on Tuesday due to importer dollar demand and renewed selling of government bonds by foreign investors.
Shares in Ceylon Tobacco Company Plc rose 8.98 percent to 1207.50 rupees, while Nestle Lanka Plc ended 6.95 percent up at 2,176.40 rupees.
Foreign investors were net sellers for a fourth straight session, selling 96.3 million rupees ($725,600) worth of shares, extending net outflows to 360 million rupees in the last four sessions.
However, they have been net buyers of 18.16 billion rupees worth of shares so far this year.
The turnover was 503.2 million rupees, well below this year's daily average of about 913.9 million rupees.
($1 = 132.7100 Sri Lanka rupees)
(Reporting by Ranga Sirilal; Editing by Jijo Jacob)
(Reuters Messaging: email@example.com)(twitter.com/rangab a)