The two countries agreed to share more intelligence at the start of an overnight visit to Sri Lanka by Thai Prime Minister Yingluck Shinawatra, the presidential secretariat said in a statement.
"We must cooperate more closely in security-related information and intelligence sharing," the statement quoted Rajapakse as saying during bilateral talks in Colombo.
It said the two leaders "agreed to enhance cooperation in defence and maritime security", but gave no further details.
However, it said Rajapakse "pointed out" that despite his troops crushing Tamil Tiger guerrillas in a major offensive in 2009, supporters of the defeated rebels were continuing their separatist campaign from overseas.
Also Read
There have been no attacks blamed on the Tamil Tigers in Sri Lanka since the middle of that year.
Meanwhile Thailand is battling a nine-year-old insurgency that has claimed more than 5,500 lives in the Muslim-majority deep south, where many complain of discrimination by Thai authorities in the mostly Buddhist nation.
Thailand and Sri Lanka share strong Buddhist links as the only two nations where the majority practice Theravada Buddhism, the more orthodox form of the religion.
Her brother was also accorded the same honour in 2003 when he was the then Thai premier.