Q. Our son, Jacob, who turned 2 in August, has been sleeping in a twin bed since he was 14 months, when our youngest son was born.

Jacob seemed to adjust fine; we put a gate at his door and childproofed the room. For a few months we would tell him a story, kiss him good night and leave the room. But then he began to cry, and we started lying down with him until he fell asleep.

You probably know the rest of the story. For months now it's the same routine every night; sometimes it takes an hour or more to get out of his room. We want to stop this now instead of 2-3 years from now.

Our pediatrician suggested putting a lock on the outside of the bedroom door and letting him cry himself to sleep. But my husband and I have a hard time listening to him scream for an hour, especially when we're trying to get our 10-month-old to sleep at the same time. We also feel a lock on the door can't be healthy psychologically.

A. What you need is a lock on your heart and that's much harder to come by, and with good reason. To ignore a weeping child gives him a sense of abandonment, if only for a little while.

Nevertheless, Jacob can't control you with his tears and he has to stay where he belongs. Another gate will keep him in place, but only you can do something about his wails.

It won't be easy. While Jacob has a bad habit of crying for an hour, you and your husband have a bad habit of answering those cries. It was just one of those patterns that started innocently.

Jacob cried at night because he was a 2-year-old standing up for his rights; he began crying longer because it worked. And with increasing competition from the baby, your older child pulled out all the stops.

In the process, he did what every 2-year-old likes to do best: He got himself a ritual. Unfortunately, you have to spend a dreary week or two substituting the bad with a good one.

He isn't going to like this -- an understatement -- but he'll accept it better if you give him extra attention during the day when he's good. Get a sitter for the baby for an hour in the afternoon, so you can spend the time "just with him." He won't comment much on any of this, but it's important for him to know, both by your actions and your words, that you like his company.

And after you've fed him a headful of compliments and a tummyful of ice cream, you tell him you have to change the nighttime ritual; that you're sorry, but it's making you quite cross and you're bored with it and he probably is too. By saying all this in a straightforward, nonjudgmental way at a time and place of your choosing, you assume control over the situation, in your mind, if not in his.

And then you and your husband decide -- thoughtfully, before a crisis -- how much time and energy you'd like to give your child each night and in what way. You'll have to allow yourselves time to wrestle or play with him a bit after supper, to bathe and dress him for bed, to hear a simple one-line prayer if that suits your style, and, of course, you'll want to read a story or even two, but always the same number: You're setting a new ritual. This is no time to give in because he begs "just one more." And then it's a sip of water, lullabye time, a kiss -- and lights out, with the gates locked.

You're sure to look sad when he cries but that's all right; a child needs to know that you hurt when he hurts, but you don't want to look--or feel--angry. That's his department.

By calling the shots, your child knows for sure that you're in charge and that's important. Although a 2-year-old is made to test his limits, he still finds it scary to be more powerful than his parents.

If you think the squalls will be too much for you, you may want to line up a more hard-hearted sitter for the first few nights, while you and your husband take the baby to a drive-in movie. This won't please Jacob either, but it will let the baby get to sleep on time and it will help you keep your resolutions.

You'll also want to reinforce your child's good behavior the very first night he falls asleep a little earlier, leaving a small, unexpected gift and others occasionally as he improves. In our house it came from a tinman who had the job of giving children good dreams. The front door opened magically when the children were asleep -- never before -- and he left presents and thank-you notes when they went to bed early because he could come in from the dew (rust, you know). Children believe the damnedest things.

While a lighter approach will change almost any tense situation, it's easier to develop if you remember that mothers and fathers still know best, at least when their children are 2.