Telling harmless lies to children is just part of being a parent, right? Maybe, but little fibs -- even those told to keep a child's fantasy alive or protect their self-esteem -- can have some negative side effects. According to a new study, children who are lied to by their parents are more likely to behave dishonestly themselves.

Previous psychological studies have found that most parents do lie to their children. Research conducted last year on 200 families in the U.S. and China found that the overwhelming majority of parents lied to their children, and that most parental lies were meant to either curb misbehavior or to preserve a child's feelings.

The University of California-San Diego researchers looked to a classic experiment in child development designed to test whether children will lie. The researchers looked at 186 children of two age groups: preschool age (3 to 5) and school age (5 to 7). One mixed-age group of the children was in the "lie" group: An experimenter told them that there was candy for them to eat in the next room, and when the child arrived, the experimenter admitted that there was no candy and that she had just wanted the child to play a game. In the "no-lie" control group, the children were told that there was a fun game in the next room, without eluding to any candy.

Then, they examined the effects of the adults' behavior on the children using a temptation resistance scenario in which they knew that the children would be tempted to lie. The children are tempted to peek at a toy that the experimenter has told them they're not allowed to look at. When the experimenter leaves the room, she explicitly tells the child to promise not to look, and then asked them if they did when she returned.

Unsurprisingly, almost all of the children peeked. The older children were more likely to lie to the experimenter when she asked them if they had peeked, with the older children in the "lie" condition being the most likely to speak dishonestly: 88 percent of lied-to older children lied themselves, versus 65 percent of older children who were not lied to. The preschool-aged children, however, were barely affected by being lied to. In both conditions. Half of the younger children in both conditions lied about peeking at the toy.

The older children's behavior might be explained by a couple of factors: 1) the children imitated the dishonest behavior of the adults, and 2) that they did not feel obligated to speak honestly to an adult who had just lied to them.

It's also important to note a major limitation of the study, which is that the children were lied to by researchers, not their parents.

"Although we know that parents often lie to their children, we didn’t want to encourage them in the lab to lie to their kids when we suspected that increased lying on the part of the child might be the outcome," UC San Diego psychologist Leslie Carver, one of the study's authors, said in an email to The Huffington Post. "Children and their parents have a long relationship history of trust built up, and we may have not even seen these results if parents had done the testing."

The differences among the children's age groups are consistent with other findings in child development. Children being lying verbally at a basic level at two or three years old, and around age four, they begin to tell lies that are more plausible. By the age of seven or eight, they begin to tell more elaborate lies that accord with various known facts.