COLOMBO, Sri Lanka (AP) _ The mother of the Sri Lankan sailor who attacked Indian Prime Minister Rajiv Gandhi last week apologized Wednesday and begged forgiveness for ''the rash, hot-blooded act.''

''This was most insulting and I am ashamed to address this to you,'' Nandawathie Mendis, the mother of nine children, wrote in a letter to Gandhi.

Her message was released by the Indian High Commission after her son, an honor guard sailor, struck Gandhi with his rifle butt as the Indian prime minister inspected the troops last Thursday.

''I cannot conceive how my son behaved this way,'' Mrs. Mendis wrote. ''You were an honored guest of our country, helping us achieve peace and harmony and you were so shamefully treated by a son of mine.''

The guard, Wijemunige Rohana De Silva, smashed the butt of his unloaded rifle on Gandhi's neck and shoulder at a farewell ceremony at the Presidential Palace.

Gandhi was in Sri Lanka to sign a peace accord aimed at ending the four- year civil war between the government, composed primarily of members of the island's Sinhalese majority, and the minority Tamil separatists. More than 6,000 people have been killed.

''You are full of compassion, understanding and mercy and will forgive this rash hot-blooded act of a youth who was swayed by the ethnic situation of the past years,'' Mrs. Mendis wrote.

A senior military source, speaking on condition of anonymity, said the sailor was likely to be court-martialed but there was no indication of the extent of punishment.

''I fervently hope and pray that I could have my son back with me in the near future,'' Mrs. Mendis said, adding that her 26-year-old son is the family's only breadwinner.