An opposition amendement to proposed new data protection legislation that sought to have the age at which internet firms can gather data from minors raised to 16 has been defeated at committee stage.

The Government wants the digital age of consent to be set at 13.

The issue was addressed during an Oireachtas Justice Committee debate on the Data Protection Bill.

The committee heard that profiling of children's data and harvesting this information for commercial purposes should be prohibited.

A number of TDs argued that the digital age of consent should be increased to 16 to prevent data harvesting and the commercial targeting of children by digital companies.

Social Democrats TD Roisín Shortall, Sinn Féin TD Donncha O'Laoghaire and Fianna Fáil 's Jim O'Callaghan were among those to raise the issue.

Mr O'Laoghaire said there are many people that would not be aware of the extent to which their data is being gathered, the profile that is being built up of them and the way that is being used to exploit them and target them.

The Sinn Féin TD said people under 18 should not be micro-targeted and should be protected from cynical and exploitative online advertisements.

He stressed the need for additional measures such as the establishment of a Digital Safety Commissioner.

Social Democrats TD Róisín Shortall believes the age of consent should be increased to 16.

She said that "as it stands the digital age of consent offers very little protection to children and young people.

"By raising the age we place the onus on the companies to introduce more robust age verification procedures and make sure parents retain a right to play a role in their children's online activities."

Ms Shortall said her party wants to specifically prohibit profiling activity rather than all processing of data.

She noted that the minister has consistently stated that the Children's Rights Alliance is in favour of setting the digital age of consent at 13.

Fianna Fáil's justice spokesperson Jim O'Callaghan spoke of the positive impact the internet has on children but warned that it also has very negative consequences with "the obsessive use by children of mobile phones".

"Children are growing up exposed to levels of intrusion and levels of information, which none of us were exposed to when we were growing up. I think there is a huge responsibility on parents when it comes to their children's access of information on the internet and their use of social media apps but there is also responsibility on legislators as well."

Mr O'Callaghan said: "Generally in law a child cannot enter into a contract until they are 18 when they become adults. What we are looking at, is what age can children consent to giving access to their data.

"The view in Fianna Fail is that 13 years of age is too young and that should be extended up to 16."

Independents4Change TD Mick Wallace said that this should not be about "creating a nanny state."

"You can tell young people not to have sex. Don't drink alcohol, don't use prohibitive (sic) drugs but we are probably more in favour of educating people around it rather than telling people what they can and can't do. We will be supporting the Government's 13 limit. We think it is the right way forward."

Minister for Justice Charlie Flanagan explained that 13 was chosen as the digital age of consent following a public consultation on the issue.

He acknowledged the sincerely held views of those who feel either 13 and 16 should be the age of consent.

However, he said the Government chose 13 as the digital age of consent, following careful consideration of expert opinion who responded to the consultation, which included the ISPCC, the Children's Ombudsman, the Children's Rights Alliance.

He also said Dr Geoffrey Shannon - Special Rapporteur on Child Protection - gave a strong recommendation to have 13 as the digital age of consent to a previous joint committee on the matter.

Additional reporting: Edel McAllister and Will Goodbody