Recalling the contribution of those who toiled for decades to build the party, he said it is because of them that the BJP got the chance to serve crores of Indians.
"Tributes to all those who have toiled hard to build the party for decades, due to which BJP has got the opportunity to serve crores of Indians across our nation's length and breadth," Modi wrote on Twitter.
The prime minister also said that whenever the BJP has been given the opportunity to serve the nation, it has focused on good governance and empowering the poor.
"In line with the party's ethos, our karyakartas (workers) have worked hard to bring a positive difference in the lives of many and done great social service," he tweeted.
Pointing out that the party's 40th anniversary comes at a time when India is battling COVID-19, Modi said, "I appeal to BJP karyakartas to follow the set of guidelines from our party president J P Nadda-ji, help those in need and reaffirm the importance of social distancing. Let's make India COVID-19-free," he said.