Kerala was a Feudal society and like all Feudal societies there was strong class differentiations.
What do you know about Marthanda Varma ? His story about Etuveetil pillaamar are just legend and folklores.
The real story is something totally different. It origins of that lay in the control of the spice trade. Those days the spice trade was controlled by two dominant groups. The Dutch and the British.
The dutch had a factor at Thenga Pattinam (kanyakumari) and the Britsh had a base at Vizhinjam
Below is image of the Dutch factory,
All negotiations for trade and protection used to happen with the immediate fudal Pillais lords who was granted authority to deal with the traders. However due t trade disputes related to monopoly the Pillai's attacked, destroyed the factor and executed the factory in charge in 1684. The dutch then moved for compensation from the Umayamma Rani of Venad who was the queen but this was opposed by the feudal Pillais since the dutch were are fault.
Seeing this, the british decided to build a fort at Vizhinjam factory to make their position stronger. But the Feudal Pillai saw through their plan and opposed that too.
However the British started building the fort without permission. This alarmed the Rani who asked them to stop further constructions but the British refused to do so. This is the image of the Anchuthengu fort which the british had started building.
Among the feudal Pillais there was enemity between the Vanchimuttom Pillai and Kodumon Pillai who were the two strongest feudal lords of that time. Kodumon Pillai attacked the british fort to destroy but Vanchimuttom Pillai secretly helped the british build the fort. The attack was unsuccessful since the British had already installed cannons and guns in the fort by then.
Later when the Rani died in 1690 the british used this opportunity to complete the fort. The british then started strengthening their position in Anchuthengu. The image below shows the view of the fort in those days.
Once this was complete the British had total command over the trade and they could decide the prices in their favour and also destroy competition. This forced the muslim traders of that time to become pirates. The only group who could handle the british then were the Dutch so the british cleverly started giving information about the dutch ships to the pirates to destroy the competition.
They refused to pay taxes to the Kerala king by then.
The british then became more arrogant and took of the land of the Devi temple and started insulting and humiliating the Hindus. This build up resentments and resulted in Kodumon Pillai attacking the fort again, this time he burnt the british ships and laid siege to the fort. But reinforcement from Mumbai saved the british again.
After this Kodumon Pillai made peace with Vanchimuttom Pillai after installing a new Rani in Attingal.
Seeing this united front, the british under Gilford decided to play it smart and started negotiating with the queen and offered to pay the tax arrears. However by then the anger of the local population against the british were already sky high. After the negotiations, the british were invited to a party on 11 April 1721 and when they arrived the Nair Pada and the Muslims joined forces and killed ALL 150 members of the british contingent.
However the Ancuthengu fort still could not be taken since it had cannons.
Image of one of the Ettuveetil Pillaamar,
This was the background to the story when Travancore king Rama Varma decided to use the antagonism for his own gain and to install his sister as the queen of Attingal. He was very friendly with the british and had already adopted a prince and a princess from Kolathunadu, at the behest of Adams (who was the head of the british contingent in kerala) and one of them was crowned the prince of (Marthanda Varma) of Travancore. He also gave british permission to build a fort at Colachel and mint coins for Travancore in 1723.
Rama Varma's nephew Prince of Neyyattinkara then attacked Attingal with the help of Naiks of Madurai whom he hired and the british. Fifteen of the leading Pillais in Attingal were executed and the remaining surrendered.
Karthika Thirunal, a princess and relative or Rama Verma, was made the queen of Attingal. Later when Marthanda Verma become king he captured all the remaining surviving Pillais of Attingal and handed them over to the British
This is the real story of Ettuveetil Pillaamar and the king of Travancore. Not the fantasy you have been fed as "history".