Researchers at the University of London conducted the study on 46 babies born at University College Hospital maternity Ward.
21 of those babies were born prematurely, which of course means they would have been in utero if they had gone to term. This gave the researchers an opportunity to monitor brain waves and study their brains and activity.
To measure whether or not they could sense pain, the researchers monitored their brain responses when the babies had a routine procedure to collect a blood sample from their heels by lancing it.
What they discovered is that the babies could feel the pain from 35 weeks on. And they extrapolated, according to Current Science magazine,
“…that it is certainly possible that babies can feel pain even before this point, but brain wave analysis could pick it up from 35 weeks onward.”