Controversial plans to appoint a specific guardian for every child aged up to 18 are set to be approved, after Holyrood rejected a last-ditch attempt to limit the impact of the proposals.

The Scottish Government wants to appoint a "named person" for every youngster in Scotland, as part of wide ranging legislation currently going through Holyrood.

Conservative spokeswoman Liz Smith had put forward amendments that would mean those aged 16 and above would not have such a guardian assigned to them.

She also sought to change the legislation to limit the function of the named person to where concerns are raised about safety, wellbeing or children's rights and to allow parents to contest any decision to appoint such a guardian.

She said these tackled "two of the most fundamental flaws" in the policy, adding that taken together the changes she proposed would "ensure the policy is based on need rather than imposed across the board".

The Children and Young People (Scotland) Bill has been put forward by the Scottish Government in a bid to support its aim of making Scotland the best place in the world to grow up.

It includes measures that will increase the amount of free childcare available to three and four-year-olds and vulnerable two-year-olds to 600 hours a year.

In addition, the Bill will allow teenagers in foster, kinship or residential care to continue to receive this support up until the age of 21, and will strengthen the law on school closures, particularly in rural areas.

But it is the proposal to appoint a named person - such as a health worker or headteacher - to safeguard children's welfare and liaise with their families that has proved most controversial.

The Law Society of Scotland, Faculty of Advocates, Free Church of Scotland and the Evangelical Alliance have all spoken out against the move.

Ms Smith said: "We believe the policy is wrong in principle, that it does not have conclusive supporting evidence and has not been properly costed."

She said "even the most ardent supporters of the policy do not believe it is workable beyond 16", adding: "We are talking here about young adults, 16 and 17-year-olds, who are allowed to marry, they are free to leave school and able to enlist, and who are being told by this Government they are old enough to vote in the upcoming referendum, but seemingly not old enough to go about their business without being assigned a named person.

"That inherent contradiction speaks for itself."

She highlighted concerns from religious groups and parents' organisations to the move, saying: "Time after time they are pointing out that the named person policy fails the criteria of what makes a good law, that it tips the balance away from parental and family responsibilities towards the state, that it is not properly costed and it will be open to legal challenge."

The Conservative urged MSPs to support her for these reasons and for "the sake of common sense".

But her pleas were rejected by Holyrood, as an amendment which would have limited the named person policy to under 16s was defeated by 51 votes to 69.

A Tory amendment to limit the function of the named person and give parents a right of appeal was dismissed by 15 votes to 106.

Children's Minister Aileen Campbell said the intention was "to ensure children and families have somewhere to go if they need an extra bit of help and that none are left without support".

She added: "We want to promote an early intervention and prevention approach, that is co-ordinated and prevents problems escalating into crisis.

"We want to ensure as far as possible no child slips through that net. A named person for every child will help us achieve all of that."

Ms Campbell stressed: "It has to be for every child because we just don't know when that extra bit of help will be needed."

She went on: "If the named person can spot early signs that a child is experiencing difficulty, they can work with the parents to put in place the right support where required. Parents still have the right not to accept that advice.

"It's about having that single point of contact so somebody knows where to go."

The Children's Minister also dismissed concerns the resources were not in place to support the introduction of the named person policy, saying the number of health visitors had increased by more than 14% since 2007.