Media captionBBC's Zubair Ahmed said the speech had been "very well-received"

Narendra Modi said India had been shamed by a recent spate of rapes, as he made his first Independence Day speech as prime minister.

He called on parents to take responsibility for their sons' actions, saying parents must teach their sons the difference between right and wrong.

Mr Modi also pledged bank accounts for all and toilets in every school.

The capital has been under a blanket of security, with thousands of police and soldiers deployed across the city.

Mr Modi, who led his party to victory in this summer's general election, addressed the nation from the 17th Century Red Fort in Delhi.

He did not read from a prepared text and for the first time in many years the prime minister did not stand behind a bullet-proof screen.

Analysis, Geeta Pandey, BBC News, Delhi

Image copyrightAFPImage caption
A large number of schoolchildren were present for the celebrations

Prime Minister Narendra Modi's first Independence Day address carried some very significant social messages. In a departure from tradition, Mr Modi spoke extempore, without consulting any notes, and in his hour-long speech, did not falter even once.

He talked about societal and family responsibility in ending rapes, advising parents to bring up better sons and not just question daughters. He lamented the skewed sex ratio and appealed to doctors to end abortion of female foetuses and advised mothers not to hanker after sons. And he spoke proudly of the "29 medals women athletes have won" at the 2014 Commonwealth Games.

Over many years, prime ministers have used their annual Independence Day speeches to warn Pakistan and for grandstanding, but Mr Modi used the historic occasion to say how he was bothered by the all-pervasive filth around him and why India must end open-air defecation and build more toilets.

The address, televised live across the country, received a huge thumbs up with many Indians taking to social media to describe it as "refreshing", "inspiring" and "impressive".

But critics have used the occasion to question his performance in the months since taking over as prime minister and his government's failure to deliver reforms to overhaul the economy going through the worst slowdown in two decades.

It's a speech not easy to find fault with, but critics say Mr Modi will ultimately be judged on his performance.