S. went to First Resort the day before her appointment in Oakland, unsure what to expect. It provided a free ultrasound. The nurse asked S. if she wanted to see the baby and turned the monitor toward her: “Look! Your baby is smiling at you.” S. was shaken, convinced she also saw the baby smiling. The nurse told her that she was at least a week further along than the Planned Parenthood estimate (ultrasound estimates can be off by several days either way). S. sobbed all the way to her car and called the clinic in Oakland, giving it the First Resort estimate. If it was correct, they told her, she would be past its deadline. S. never made it to the Oakland clinic and in a matter of days gave up looking for another clinic that could perform a later procedure. She was out of gas money, hadn’t eaten a decent meal in weeks and resigned herself to the fact that, no matter what she wanted or how it would affect her life, she was going to have a baby.

When Diana Greene Foster, a demographer and an associate professor of obstetrics and gynecology at the University of California, San Francisco, first began studying women who were turned away from abortion clinics, she was struck by how little data there were. A few clinics kept records, but no one had compiled them nationally. And there was no research on how these women fared over time. What, Foster wondered, were the consequences of having to carry an unwanted pregnancy to term? Did it take a higher psychological or economic toll than having an abortion? Or was the reverse true — did the new baby make up for any social or financial difficulties?

“It’s not that the study was so hard to do,” Foster says. But no one had done it before. Since Roe v. Wade was decided in 1973, the debate over abortion has focused primarily on the ramifications of having one. The abortion rights community maintains that abortion is safe, both physically and psychologically — a position most scientists endorse. Those on the anti-abortion side argue that abortion is immoral, can cause a fetus pain and leads to long-lasting negative physical and psychological effects in the women who have the procedure. There is no credible research to support a “post-abortion syndrome,” as a report published by the American Psychological Association in 2008 made clear. Yet the notion has influenced restrictive laws in many states. In Alabama, women who seek an abortion must have an ultrasound and be offered the option to view the image; in South Dakota, women must wait at least 72 hours after a consultation with a doctor before having the procedure. “The unstated assumption of most new abortion restrictions — mandatory ultrasound viewing, waiting periods, mandated state ‘information,’ ” Foster says, “is that women don’t know what they are doing when they try to terminate a pregnancy. Or they can’t make a decision they won’t regret.” Lost in the controversy, however, is the flip side of the question. What, Foster wondered, could the women who did not have the abortions they sought tell us about the women who did?

Most studies on the effects of abortion compare women who have abortions with those who choose to carry their pregnancies to term. It is like comparing people who are divorced with people who stay married, instead of people who get the divorce they want with the people who don’t. Foster saw this as a fundamental flaw. By choosing the right comparison groups — women who obtain abortions just before the gestational deadline versus women who miss that deadline and are turned away — Foster hoped to paint a more accurate picture. Do the physical, psychological and socioeconomic outcomes for these two groups of women differ? Which is safer for them, abortion or childbirth? Which causes more depression and anxiety? “I tried to measure all the ways in which I thought having a baby might make you worse off,” Foster says, “and the ways in which having a baby might make you better off, and the same with having an abortion.”

Foster began by gathering data locally. She ran the study out of her office at U.C.S.F. (I am a student in the U.C. Berkeley-U.C.S.F. Joint Medical Program but did not know Foster before reporting this article.) When the counselors at a nearby abortion clinic received a woman who was too far along to terminate her pregnancy, they called Foster, who would run over and arrange to interview the patient. Given the stigma attached to seeking an abortion later in pregnancy, Foster expected that many women would be reluctant to be part of her study. But four out of five women agreed to participate. “Sometimes, if you tell them that their experience is valuable, that it might help other people in their situation, they will come through,” she says.

Initially, Foster’s study was confined to women whose pregnancies were in a narrow band of time on either side of this particular clinic’s gestational limit — two weeks under or three weeks over. (In California, state law allows an abortion up to what a physician considers viability, but clinics can set their own limits.) Eventually Foster received multiple foundation grants that allowed her to hire additional staff and recruit more subjects. The study, which is ongoing, encompasses 30 clinics from 21 states across the country. The clinics’ gestational limits vary from 10 weeks to the end of the second trimester, with a vast majority falling in the second trimester, typically defined as Weeks 14 to 26 of pregnancy. Women turned away from these “last stop” clinics had no other options within 150 miles. Of some 3,000 women who were asked to participate, 956 have completed a baseline interview and agreed to follow-up interviews every six months. Of those women, 452 were within two weeks of their facility’s cutoff and received an abortion, and 231 missed the cutoff by up to three weeks and were turned away. About 20 percent of the turnaways received an abortion elsewhere. Foster compared the remaining women who carried their pregnancies to term with the near-limit abortion patients. (The 273 other women in the study received a first-trimester abortion and acted as a control group. In the United States, 88 percent of abortions occur in the first 12 weeks, and Foster wanted to be sure that the near-limit abortion patients did not differ significantly in their outcomes from first-trimester abortion patients.) Of the turnaways in Foster’s study who gave birth, 9 percent eventually put their children up for adoption.

There are many reasons women are turned away from an abortion clinic — lack of funds (many insurance plans don’t cover abortion) or obesity (excess weight can make the procedure more complicated) — but most simply arrive too late. Women cite not recognizing their pregnancies, travel and procedure costs, insurance problems and not knowing where to find care as common reasons for delay. These are the women for whom “society has the absolute least sympathy,” Foster acknowledges. While a majority of Americans (53 percent) agree with Roe, many of those who support abortion rights draw the line at later stages of pregnancy. And the law reflects this view. Roe v. Wade guarantees a woman’s right to abortion only up to the “viability” of a fetus, with exceptions for danger to a woman’s health. (Viability varies depending on the medical expert you ask, typically at 23 weeks or more.) But the widespread discomfort with abortions near viability is reflected in recent bans on so-called partial-birth abortions. And many clinics, reacting to state law, set their own gestational limits — often 20 to 22 weeks — making later-term abortion more difficult to find in some states than in others. (In the U.S., 87 percent of counties have no abortion provider at all.)