MSPs last night approved the Scottish Government's wide-ranging Children And Young People Bill.
However, the Christian Institute, a pressure group that promotes family life and a literal interpretation of the Bible, immediately announced plans for a court challenge.
The group said provisions giving all children an official guardian - or named person - to consider their welfare is an intrusion into family life and breached Article 8 of the European Convention On Human Rights.
Director Colin Hart said: "This is a dreadful extension of the state's tentacles into family life.
"Churches, lawyers and parents opposed this, but we are faced with the arrogance of a politically correct pseudo elite intent on stamping their unrepresentative views on the people of Scotland.
"We have no option but to challenge this illegal law all the way."
The group says it has £30,000 to spend on a court challenge, which will be based on a legal opinion already provided by human rights QC Aidan O'Neill.
The institute linked the move with recent Holyrood laws allowing same-sex marriage, which the group campaigned unsuccessfully to prevent.
Mr Hart said: "It is clear this bill breaches European rules through its attack on the family. This is Big Brother politics writ large. Ordinary Scots should be very afraid.
"We could find a situation where a child objects to being taught about gay marriage in school and is reported to the named person, who then calls in social services to deal with the parents because their views are not in line with political correctness."
Holyrood passed the bill after a marathon final stage debate. The Scottish Conservatives failed with a series of last-ditch amendments to scrap, or limit, the provisions creating a named person guardian for every child.
In most cases they will be a health visitor or, when a child reaches school age, a head teacher.
If the named person has concerns about a child's welfare, they will, under certain circumstances, be able to request information from other agencies, such as the health service or police, and refer cases to social workers.
Highland and Lothian health areas already use the system, which is backed by leading children's charities and the Royal College Of Nursing.
It follows cases in which children died despite different agencies seeing some evidence of neglect, prompting claims they fell through the net.
The Scottish Government said: "We are confident the bill is compliant with the European Convention On Human Rights.
"Families are not required to accept advice or offers of help from the named person.
"Any actions or advice from the named person must be fair, proportionate and respect rights with the aim of safeguarding the wellbeing of the child."
It was unclear last night whether the legal challenge would delay implementation of the bill.
Health and education authorities will not be obliged to appoint official guardians until August 2016.
MSP Liz Smith, the Scottish Conservatives' spokeswoman on young people, said: "This will tip the balance of family responsibility away from parents towards the state - something most parents find completely unacceptable.
"Forcing all young people to have a named person will, inevitably, dilute the resources available for our most vulnerable children."
Scottish Labour, which backed the measure, said the Government had failed to explain it. Kezia Dugdale, the party's education spokeswoman, said: "This Bill has led to confusion and concern across Scotland and that is the direct result of [Children's Minister] Aileen Campbell and the SNP being incapable of explaining the bill and its effects.
"There are widespread concerns about the resources available to deliver this bill."
Ms Campbell said: "This landmark bill is testament to the ambition, hard work and dedication of many young people, their families and countless others who have backed them in their calls for improved recognition and support from public and other services as they move towards adulthood."
Details of the bill
Which children will be given a "named person" to look out for their interests?
Every child in Scotland from birth to age 18, with the exception of those over 16 in the military. • Who will be the named person? In the first days of a baby's life it is likely to be a midwife. A health visitor will then take over until a child reaches school age, when a head teacher or senior teacher will become the named person in most cases.
What is their role?
They will be a central point of contact for the child, or the parents, to help with any problems with services. They will also have the right, if they are concerned about the welfare of the child, to request information other agencies may hold. They will be expected to flag up potential problems to social workers.
Why is the system being set up?
It is partly an attempt to ensure that children do not fall through the net. It follows a number of tragic cases in which children have died after agencies failed to share concerns about their welfare. The Children And Young People Bill is one of Holyrood's most wide-ranging pieces of legislation. Other key provisions include:
- Teenagers will gain the right to remain in care, or "looked after," until they are 21.
- Local councils will have to provide greater justification for closing rural schools.
- All three- and four-year-olds, and the most vulnerable two-year-olds, will be entitled to up to 600 hours of free childcare per year.
- All children in the first three years of primary school will be entitled to a free lunch.